summaryrefslogtreecommitdiff
path: root/apps/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Makefile')
-rw-r--r--apps/Makefile7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 9c2b961a5a..dfd1ae2710 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -31,12 +31,11 @@ ifndef MEM
31 MEM=2 31 MEM=2
32endif 32endif
33 33
34LDS := $(FIRMWARE)/app.lds
35
34ifdef DEBUG 36ifdef DEBUG
35 DEFINES := -DDEBUG 37 DEFINES := -DDEBUG
36 CFLAGS += -g 38 CFLAGS += -g
37 LDS := $(FIRMWARE)/gdb.lds
38else
39 LDS := $(FIRMWARE)/app.lds
40endif 39endif
41 40
42SRC := $(wildcard *.c) 41SRC := $(wildcard *.c)
@@ -76,7 +75,7 @@ $(OBJDIR)/librockbox.a:
76# MEM should be passed on to this makefile with the chosen memory size given 75# MEM should be passed on to this makefile with the chosen memory size given
77# in number of MB 76# in number of MB
78$(LINKFILE): $(LDS) 77$(LINKFILE): $(LDS)
79 cat $< | $(CC) -DMEMORYSIZE=$(MEM) -E -P - >$@ 78 cat $< | $(CC) -DMEMORYSIZE=$(MEM) $(DEFINES) -E -P - >$@
80 79
81$(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/librockbox.a 80$(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/librockbox.a
82 $(CC) -Os -nostdlib -o $(OBJDIR)/rockbox.elf $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map 81 $(CC) -Os -nostdlib -o $(OBJDIR)/rockbox.elf $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map