Makefile.ds
changeset 2735 204be4fc2726
child 2749 1c5f440a60fe
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile.ds	Wed Aug 27 15:10:03 2008 +0000
     1.3 @@ -0,0 +1,129 @@
     1.4 +
     1.5 +#LibSDL 1.3 porting and enhancements by Darren Alton (lifning)
     1.6 +#LibSDL 1.2.9 DS porting by Troy Davis(GPF)
     1.7 +
     1.8 +ifeq ($(strip $(DEVKITPRO)),)
     1.9 +$(error "Please set DEVKITPRO in your environment (available from http://www.devkitpro.org). export DEVKITPRO=<path to>devkitPro")
    1.10 +endif
    1.11 +ifeq ($(strip $(DEVKITARM)),)
    1.12 +DEVKITARM = $(DEVKITPRO)/devkitARM
    1.13 +endif
    1.14 +PATH := $(PATH):$(DEVKITARM)/bin
    1.15 +
    1.16 +CC = arm-eabi-gcc
    1.17 +AR = arm-eabi-ar
    1.18 +RANLIB = arm-eabi-ranlib
    1.19 +
    1.20 +#ifdef GL
    1.21 +#DEFS += -DSDL_VIDEO_OPENGL=1
    1.22 +#TARGET = libSDL_gl.a
    1.23 +#else
    1.24 +TARGET = libSDL.a
    1.25 +#endif
    1.26 +
    1.27 +#CFLAGS=$(DEFS) -Iinclude
    1.28 +CFLAGS	=	-mthumb -mthumb-interwork \
    1.29 +		-march=armv5te -mtune=arm946e-s \
    1.30 +		-O2 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
    1.31 +		-DARM9 -D__NDS__ -I$(DEVKITPRO)/libnds/include -DENABLE_NDS -DNO_SIGNAL_H -DDISABLE_THREADS -DPACKAGE=\"SDL\" -DVERSION=\"1.3\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 \
    1.32 +		-Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video
    1.33 +
    1.34 +#src/audio/disk/SDL_diskaudio.c \
    1.35 +#src/audio/dummy/SDL_dummyaudio.c \
    1.36 +
    1.37 +SRCS = \
    1.38 +src/SDL.c \
    1.39 +src/SDL_compat.c \
    1.40 +src/SDL_error.c \
    1.41 +src/SDL_fatal.c \
    1.42 +src/audio/nds/SDL_ndsaudio.c \
    1.43 +src/audio/SDL_audio.c \
    1.44 +src/audio/SDL_audiocvt.c \
    1.45 +src/audio/SDL_audiodev.c \
    1.46 +src/audio/SDL_audiotypecvt.c \
    1.47 +src/audio/SDL_mixer.c \
    1.48 +src/audio/SDL_mixer_m68k.c \
    1.49 +src/audio/SDL_mixer_MMX.c \
    1.50 +src/audio/SDL_mixer_MMX_VC.c \
    1.51 +src/audio/SDL_wave.c \
    1.52 +src/cdrom/dummy/SDL_syscdrom.c \
    1.53 +src/cdrom/SDL_cdrom.c \
    1.54 +src/cpuinfo/SDL_cpuinfo.c \
    1.55 +src/events/SDL_events.c \
    1.56 +src/events/SDL_keyboard.c \
    1.57 +src/events/SDL_mouse.c \
    1.58 +src/events/SDL_quit.c \
    1.59 +src/events/SDL_windowevents.c \
    1.60 +src/file/SDL_rwops.c \
    1.61 +src/joystick/nds/SDL_sysjoystick.c \
    1.62 +src/joystick/SDL_joystick.c \
    1.63 +src/stdlib/SDL_getenv.c \
    1.64 +src/stdlib/SDL_iconv.c \
    1.65 +src/stdlib/SDL_malloc.c \
    1.66 +src/stdlib/SDL_qsort.c \
    1.67 +src/stdlib/SDL_stdlib.c \
    1.68 +src/stdlib/SDL_string.c \
    1.69 +src/thread/SDL_thread.c \
    1.70 +src/thread/nds/SDL_syscond.c \
    1.71 +src/thread/nds/SDL_sysmutex.c \
    1.72 +src/thread/nds/SDL_syssem.c \
    1.73 +src/thread/nds/SDL_systhread.c \
    1.74 +src/timer/nds/SDL_systimer.c \
    1.75 +src/timer/SDL_timer.c \
    1.76 +src/video/nds/SDL_ndsevents.c \
    1.77 +src/video/nds/SDL_ndsrender.c \
    1.78 +src/video/nds/SDL_ndsvideo.c \
    1.79 +src/video/dummy/SDL_nullevents.c \
    1.80 +src/video/dummy/SDL_nullrender.c \
    1.81 +src/video/dummy/SDL_nullvideo.c \
    1.82 +src/video/SDL_blit_0.c \
    1.83 +src/video/SDL_blit_1.c \
    1.84 +src/video/SDL_blit_A.c \
    1.85 +src/video/SDL_blit_auto.c \
    1.86 +src/video/SDL_blit.c \
    1.87 +src/video/SDL_blit_copy.c \
    1.88 +src/video/SDL_blit_N.c \
    1.89 +src/video/SDL_blit_slow.c \
    1.90 +src/video/SDL_bmp.c \
    1.91 +src/video/SDL_fill.c \
    1.92 +src/video/SDL_gamma.c \
    1.93 +src/video/SDL_pixels.c \
    1.94 +src/video/SDL_rect.c \
    1.95 +src/video/SDL_renderer_gl.c \
    1.96 +src/video/SDL_renderer_sw.c \
    1.97 +src/video/SDL_RLEaccel.c \
    1.98 +src/video/SDL_stretch.c \
    1.99 +src/video/SDL_surface.c \
   1.100 +src/video/SDL_video.c \
   1.101 +src/video/SDL_yuv_mmx.c \
   1.102 +src/video/SDL_yuv_sw.c \
   1.103 +
   1.104 +OBJS = $(SRCS:.c=.o)
   1.105 +
   1.106 +TEST = \
   1.107 +test/nds-test-progs/general/general.nds \
   1.108 +test/nds-test-progs/sprite/sprite.nds \
   1.109 +test/nds-test-progs/sprite2/sprite2.nds \
   1.110 +
   1.111 +
   1.112 +all: $(TARGET)
   1.113 +
   1.114 +$(TARGET): copy_config \
   1.115 +	$(OBJS)
   1.116 +	$(AR) rc $(TARGET) $(OBJS)
   1.117 +	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
   1.118 +
   1.119 +install: $(TARGET)
   1.120 +	@cp libSDL.a $(DEVKITPRO)/libnds/lib/
   1.121 +	@mkdir -p $(DEVKITPRO)/libnds/include/SDL/
   1.122 +	@cp include/*.h $(DEVKITPRO)/libnds/include/SDL/
   1.123 +
   1.124 +nds_test:
   1.125 +	$(MAKE) -C test/nds-test-progs
   1.126 +
   1.127 +copy_config:
   1.128 +	@cp include/SDL_config.h.default include/SDL_config.h
   1.129 +
   1.130 +clean:
   1.131 +	rm -f include/SDL_config.h $(OBJS)
   1.132 +