summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-05-17 07:52:28 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-05-17 07:52:28 +0000
commit82b08d0bdb81562486be52654f4046592b659865 (patch)
treeb38ca99ad3c31fb954d8063c800ddaf1048a7629
parentafd30bb4cd64077274f90c0154ba74022a0cfdc3 (diff)
downloadrockbox-82b08d0bdb81562486be52654f4046592b659865.tar.gz
rockbox-82b08d0bdb81562486be52654f4046592b659865.zip
Added DEBUG option and made thread.o special
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@610 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 62bb9f98da..25d1b1e29c 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -20,15 +20,25 @@ TARGET = -DARCHOS_PLAYER=1
20#TARGET = -DARCHOS_PLAYER_OLD=1 20#TARGET = -DARCHOS_PLAYER_OLD=1
21#TARGET = -DARCHOS_RECORDER=1 21#TARGET = -DARCHOS_RECORDER=1
22 22
23CFLAGS = -Os -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) -DDEBUG 23CFLAGS = -W -Wall -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET)
24
25ifdef DEBUG
26CFLAGS += -g -DDEBUG
27else
28CFLAGS += -O -fomit-frame-pointer -fschedule-insns
29endif
30
24AFLAGS += -small -relax 31AFLAGS += -small -relax
25 32
26SRC := $(wildcard drivers/*.c common/*.c malloc/*.c *.c) 33SRC := $(wildcard drivers/*.c common/*.c malloc/*.c *.c)
27OBJS := $(SRC:%.c=%.o) crt0.o 34EXCLUDED_SRC := thread.c
35
36SRC := $(filter-out $(EXCLUDED_SRC),$(SRC))
37
38OBJS := $(SRC:%.c=%.o) $(EXCLUDED_SRC:%.c=%.o) crt0.o
28DEPS:=.deps 39DEPS:=.deps
29DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc 40DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc
30 41
31
32librockbox.a: $(OBJS) 42librockbox.a: $(OBJS)
33 $(AR) ruv $@ $+ 43 $(AR) ruv $@ $+
34 44
@@ -44,3 +54,7 @@ $(DEPS)/%.d: %.c
44 [ -s $@ ] || rm -f $@' 54 [ -s $@ ] || rm -f $@'
45 55
46-include $(SRC:%.c=$(DEPS)/%.d) 56-include $(SRC:%.c=$(DEPS)/%.d)
57
58# Special targets
59thread.o: thread.c thread.h
60 $(CC) -c -O -fomit-frame-pointer $(CFLAGS) $<