Makefile.ds
author Darren Alton <dalton@stevens.edu>
Thu, 19 Jun 2008 07:11:35 +0000
branchgsoc2008_nds
changeset 2673 24a6b3588eac
parent 2670 6e4669f4db49
child 2674 f1d07ba2e275
permissions -rw-r--r--
Cleaned up and added joypad support from 1.2.9 NDS port. Also some minor video driver bugfixes.
     1 
     2 #LibSDL 1.3 porting and enhancements by Darren Alton (lifning)
     3 #LibSDL 1.2.9 DS porting by Troy Davis(GPF)
     4 
     5 ifeq ($(strip $(DEVKITARM)),)
     6 $(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM)
     7 endif
     8 
     9 CC = arm-eabi-gcc
    10 AR = arm-eabi-ar
    11 RANLIB = arm-eabi-ranlib
    12 
    13 #ifdef GL
    14 #DEFS += -DSDL_VIDEO_OPENGL=1
    15 #TARGET = libSDL_gl.a
    16 #else
    17 TARGET = libSDL.a
    18 #endif
    19 
    20 #CFLAGS=$(DEFS) -Iinclude
    21 CFLAGS	=	-mthumb -mthumb-interwork \
    22 		-march=armv5te -mtune=arm946e-s \
    23 		-O2 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
    24 		-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 \
    25 		-Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video
    26 
    27 SRCS = \
    28 src/SDL.c \
    29 src/SDL_compat.c \
    30 src/SDL_error.c \
    31 src/SDL_fatal.c \
    32 src/audio/disk/SDL_diskaudio.c \
    33 src/audio/dummy/SDL_dummyaudio.c \
    34 src/audio/SDL_audio.c \
    35 src/audio/SDL_audiocvt.c \
    36 src/audio/SDL_audiodev.c \
    37 src/audio/SDL_audiotypecvt.c \
    38 src/audio/SDL_mixer.c \
    39 src/audio/SDL_mixer_m68k.c \
    40 src/audio/SDL_mixer_MMX.c \
    41 src/audio/SDL_mixer_MMX_VC.c \
    42 src/audio/SDL_wave.c \
    43 src/cdrom/dummy/SDL_syscdrom.c \
    44 src/cdrom/SDL_cdrom.c \
    45 src/cpuinfo/SDL_cpuinfo.c \
    46 src/events/SDL_events.c \
    47 src/events/SDL_keyboard.c \
    48 src/events/SDL_mouse.c \
    49 src/events/SDL_quit.c \
    50 src/events/SDL_windowevents.c \
    51 src/file/SDL_rwops.c \
    52 src/joystick/nds/SDL_sysjoystick.c \
    53 src/joystick/SDL_joystick.c \
    54 src/stdlib/SDL_getenv.c \
    55 src/stdlib/SDL_iconv.c \
    56 src/stdlib/SDL_malloc.c \
    57 src/stdlib/SDL_qsort.c \
    58 src/stdlib/SDL_stdlib.c \
    59 src/stdlib/SDL_string.c \
    60 src/thread/SDL_thread.c \
    61 src/thread/nds/SDL_syscond.c \
    62 src/thread/nds/SDL_sysmutex.c \
    63 src/thread/nds/SDL_syssem.c \
    64 src/thread/nds/SDL_systhread.c \
    65 src/timer/dummy/SDL_systimer.c \
    66 src/timer/SDL_timer.c \
    67 src/video/nds/SDL_ndsevents.c \
    68 src/video/nds/SDL_ndsrender.c \
    69 src/video/nds/SDL_ndsvideo.c \
    70 src/video/SDL_blit_0.c \
    71 src/video/SDL_blit_1.c \
    72 src/video/SDL_blit_A.c \
    73 src/video/SDL_blit_auto.c \
    74 src/video/SDL_blit.c \
    75 src/video/SDL_blit_copy.c \
    76 src/video/SDL_blit_N.c \
    77 src/video/SDL_blit_slow.c \
    78 src/video/SDL_bmp.c \
    79 src/video/SDL_fill.c \
    80 src/video/SDL_gamma.c \
    81 src/video/SDL_pixels.c \
    82 src/video/SDL_rect.c \
    83 src/video/SDL_renderer_gl.c \
    84 src/video/SDL_renderer_sw.c \
    85 src/video/SDL_RLEaccel.c \
    86 src/video/SDL_stretch.c \
    87 src/video/SDL_surface.c \
    88 src/video/SDL_video.c \
    89 src/video/SDL_yuv_mmx.c \
    90 src/video/SDL_yuv_sw.c \
    91 
    92 OBJS = $(SRCS:.c=.o)
    93 
    94 TEST = \
    95 	test/checkkeys.c \
    96 	test/graywin.c \
    97 	test/loopwave.c \
    98 	test/testalpha.c \
    99 	test/testbitmap.c \
   100 	test/testcdrom.c \
   101 	test/testerror.c \
   102 	test/testgamma.c \
   103 	test/testgl.c \
   104 	test/testhread.c \
   105 	test/testjoystick.c \
   106 	test/testkeys.c \
   107 	test/testlock.c \
   108 	test/testoverlay.c \
   109 	test/testpalette.c \
   110 	test/testsem.c \
   111 	test/testsprite.c \
   112 	test/testtimer.c \
   113 	test/testtypes.c \
   114 	test/testver.c \
   115 	test/testvidinfo.c \
   116 	test/testwin.c \
   117 	test/testwm.c \
   118 	test/threadwin.c \
   119 	test/torturethread.c \
   120 
   121 all: $(TARGET)
   122 
   123 $(TARGET): copy_config \
   124 	$(OBJS)
   125 	$(AR) rc $(TARGET) $(OBJS)
   126 	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
   127 
   128 install: $(TARGET)
   129 	@cp libSDL.a $(DEVKITPRO)/libnds/lib/
   130 	@mkdir -p $(DEVKITPRO)/libnds/include/SDL/
   131 	@cp include/*.h $(DEVKITPRO)/libnds/include/SDL/
   132 
   133 copy_config:
   134 	@cp include/SDL_config.h.default include/SDL_config.h
   135 
   136 clean:
   137 	rm -f include/SDL_config.h $(OBJS)
   138