From 82b08d0bdb81562486be52654f4046592b659865 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 17 May 2002 07:52:28 +0000 Subject: Added DEBUG option and made thread.o special git-svn-id: svn://svn.rockbox.org/rockbox/trunk@610 a1c6a512-1295-4272-9138-f99709370657 --- firmware/Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'firmware/Makefile') 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 #TARGET = -DARCHOS_PLAYER_OLD=1 #TARGET = -DARCHOS_RECORDER=1 -CFLAGS = -Os -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) -DDEBUG +CFLAGS = -W -Wall -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) + +ifdef DEBUG +CFLAGS += -g -DDEBUG +else +CFLAGS += -O -fomit-frame-pointer -fschedule-insns +endif + AFLAGS += -small -relax SRC := $(wildcard drivers/*.c common/*.c malloc/*.c *.c) -OBJS := $(SRC:%.c=%.o) crt0.o +EXCLUDED_SRC := thread.c + +SRC := $(filter-out $(EXCLUDED_SRC),$(SRC)) + +OBJS := $(SRC:%.c=%.o) $(EXCLUDED_SRC:%.c=%.o) crt0.o DEPS:=.deps DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc - librockbox.a: $(OBJS) $(AR) ruv $@ $+ @@ -44,3 +54,7 @@ $(DEPS)/%.d: %.c [ -s $@ ] || rm -f $@' -include $(SRC:%.c=$(DEPS)/%.d) + +# Special targets +thread.o: thread.c thread.h + $(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -- cgit v1.2.3