Makefile.ds
branchSDL-1.2
changeset 3976 8582c6a5ca16
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile.ds	Mon Jun 25 00:50:20 2007 +0000
     1.3 @@ -0,0 +1,63 @@
     1.4 +#LibSDL 1.2.12
     1.5 +#DS porting by Troy Davis(GPF)
     1.6 +
     1.7 +
     1.8 +ifeq ($(strip $(DEVKITPRO)),)
     1.9 +$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
    1.10 +endif
    1.11 +ifeq ($(strip $(DEVKITARM)),)
    1.12 +DEVKITARM := $(DEVKITPRO)/devkitARM
    1.13 +endif
    1.14 +
    1.15 +
    1.16 +SRCS = $(shell echo ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c ./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c ./src/joystick/*.c ./src/joystick/nds/*.c ./src/cdrom/dummy/*.c ./src/thread/generic/*.c ./src/timer/nds/*.c ./src/loadso/dummy/*.c ./src/audio/dummy/*.c ./src/audio/nds/*.c ./src/video/dummy/*.c ./src/video/nds/*.c)
    1.17 +
    1.18 +OBJS = $(SRCS:.c=.o) 
    1.19 +	
    1.20 +
    1.21 +SUBDIRS=
    1.22 +
    1.23 +CC=arm-eabi-gcc
    1.24 +CXX=arm-eabi-g++ 
    1.25 +LDSHARED=$(CXX)
    1.26 +AR=arm-eabi-ar rc
    1.27 +RANLIB=arm-eabi-ranlib 
    1.28 +
    1.29 +CFLAGS	=	-mthumb -mthumb-interwork \
    1.30 +		-march=armv5te -mtune=arm946e-s \
    1.31 +		-O2 -Wall -Wwrite-strings -Wpointer-arith \
    1.32 +		-DARM9 -D__NDS__ -I$(DEVKITPRO)/libnds/include -Iinclude
    1.33 +
    1.34 +CXXFLAGS += $(CFLAGS)
    1.35 +
    1.36 +all: $(DEVKITPRO)/libnds/lib/libSDL.a       
    1.37 +
    1.38 +
    1.39 +$(DEVKITPRO)/libnds/lib/libSDL.a:		$(OBJS)
    1.40 +	$(AR) $@ $(OBJS)
    1.41 +	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1 	
    1.42 +
    1.43 +clean: 
    1.44 +	find . -name "*.o" |xargs rm -f
    1.45 +	find . -name "*.d" |xargs rm -f
    1.46 +	-rm -f *.elf
    1.47 +	-rm -f *.nds
    1.48 +	-rm -f *.gba
    1.49 +	-rm -f *.arm9
    1.50 +	-rm -f *.map
    1.51 +	-rm -f *.img
    1.52 +	-rm -Rf *.d
    1.53 +
    1.54 +
    1.55 +subdirs: $(patsubst %, _dir_%, $(SUBDIRS))
    1.56 +
    1.57 +$(patsubst %, _dir_%, $(SUBDIRS)):
    1.58 +	$(MAKE) -C $(patsubst _dir_%, %, $@)
    1.59 +
    1.60 +clean_subdirs: $(patsubst %, _clean_dir_%, $(SUBDIRS))
    1.61 +
    1.62 +$(patsubst %, _clean_dir_%, $(SUBDIRS)):
    1.63 +	$(MAKE) -C $(patsubst _clean_dir_%, %, $@) clean
    1.64 +
    1.65 +#include $(DEVKITARM)/ds_rules
    1.66 +