summaryrefslogtreecommitdiff
path: root/firmware/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/Makefile')
-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) $<