2 #DS porting by Troy Davis(GPF)
5 ifeq ($(strip $(DEVKITPRO)),)
6 $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
8 ifeq ($(strip $(DEVKITARM)),)
9 DEVKITARM := $(DEVKITPRO)/devkitARM
13 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)
24 RANLIB=arm-eabi-ranlib
26 CFLAGS = -mthumb -mthumb-interwork \
27 -march=armv5te -mtune=arm946e-s \
28 -O2 -Wall -Wwrite-strings -Wpointer-arith \
29 -DARM9 -D__NDS__ -I$(DEVKITPRO)/libnds/include -Iinclude
33 all: $(DEVKITPRO)/libnds/lib/libSDL.a
36 $(DEVKITPRO)/libnds/lib/libSDL.a: $(OBJS)
38 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
41 find . -name "*.o" |xargs rm -f
42 find . -name "*.d" |xargs rm -f
52 subdirs: $(patsubst %, _dir_%, $(SUBDIRS))
54 $(patsubst %, _dir_%, $(SUBDIRS)):
55 $(MAKE) -C $(patsubst _dir_%, %, $@)
57 clean_subdirs: $(patsubst %, _clean_dir_%, $(SUBDIRS))
59 $(patsubst %, _clean_dir_%, $(SUBDIRS)):
60 $(MAKE) -C $(patsubst _clean_dir_%, %, $@) clean
62 #include $(DEVKITARM)/ds_rules