Makefile.ds
changeset 5289 1916a9e9714d
parent 5271 73f8030f0c72
child 5290 25af68c1901d
--- a/Makefile.ds	Sun Feb 13 13:46:10 2011 -0800
+++ b/Makefile.ds	Sun Feb 13 14:01:02 2011 -0800
@@ -1,13 +1,13 @@
 
-#LibSDL 1.3 porting and enhancements by Darren Alton (lifning)
-#LibSDL 1.2.9 DS porting by Troy Davis(GPF)
-
-ifeq ($(strip $(DEVKITPRO)),)
-$(error "Please set DEVKITPRO in your environment (available from http://www.devkitpro.org). export DEVKITPRO=<path to>devkitPro")
-endif
-ifeq ($(strip $(DEVKITARM)),)
+#LibSDL 1.3 porting and enhancements by Darren Alton (lifning)
+#LibSDL 1.2.9 DS porting by Troy Davis(GPF)
+
+ifeq ($(strip $(DEVKITPRO)),)
+$(error "Please set DEVKITPRO in your environment (available from http://www.devkitpro.org). export DEVKITPRO=<path to>devkitPro")
+endif
+ifeq ($(strip $(DEVKITARM)),)
 DEVKITARM = $(DEVKITPRO)/devkitARM
-endif
+endif
 PATH := $(PATH):$(DEVKITARM)/bin
 
 CC = arm-eabi-gcc
@@ -40,6 +40,7 @@
 src/SDL_hints.c \
 src/SDL_log.c \
 src/atomic/SDL_atomic.c \
+src/atomic/SDL_spinlock.c \
 src/audio/SDL_audio.c \
 src/audio/SDL_audiocvt.c \
 src/audio/SDL_audiodev.c \
@@ -118,6 +119,10 @@
 
 all: $(TARGET) install nds_test
 
+# That file must be compiled in arm mode, not thumb mode.
+src/atomic/SDL_spinlock.o: src/atomic/SDL_spinlock.c
+	$(CC) $(CFLAGS) -mno-thumb -o $@ -c $^
+
 $(TARGET): copy_config \
 	$(OBJS)
 	$(AR) rc $(TARGET) $(OBJS)