summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 4fea03db47..311a34903c 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -25,16 +25,17 @@ TARGET = -DARCHOS_PLAYER_OLD=1
25# store output files in this directory: 25# store output files in this directory:
26OBJDIR = . 26OBJDIR = .
27 27
28CFLAGS = -O -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES)
29AFLAGS += -small -relax
30
28ifdef DEBUG 31ifdef DEBUG
29 DEFINES := -DDEBUG 32 DEFINES := -DDEBUG
33 CFLAGS += -g
30 LDS := $(FIRMWARE)/gdb.lds 34 LDS := $(FIRMWARE)/gdb.lds
31else 35else
32 LDS := $(FIRMWARE)/app.lds 36 LDS := $(FIRMWARE)/app.lds
33endif 37endif
34 38
35CFLAGS = -O -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES)
36AFLAGS += -small -relax
37
38SRC := $(wildcard *.c) 39SRC := $(wildcard *.c)
39 40
40ifeq ($(TARGET),-DARCHOS_RECORDER) 41ifeq ($(TARGET),-DARCHOS_RECORDER)
@@ -46,7 +47,7 @@ OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
46all : $(OBJDIR)/archos.mod # archos.asm 47all : $(OBJDIR)/archos.mod # archos.asm
47 48
48$(OBJDIR)/librockbox.a: 49$(OBJDIR)/librockbox.a:
49 make -C $FIRMWARE OBJDIR=$(OBJDIR) 50 make -C $(FIRMWARE) OBJDIR=$(OBJDIR)
50 51
51$(OBJDIR)/archos.elf : $(OBJS) $(LDS) $(OBJDIR)/librockbox.a 52$(OBJDIR)/archos.elf : $(OBJS) $(LDS) $(OBJDIR)/librockbox.a
52 $(CC) -Os -nostdlib -o $(OBJDIR)/archos.elf $(OBJS) -lrockbox -lgcc -lc -L$(FIRMWARE) -T$(LDS) -Wl,-Map,archos.map 53 $(CC) -Os -nostdlib -o $(OBJDIR)/archos.elf $(OBJS) -lrockbox -lgcc -lc -L$(FIRMWARE) -T$(LDS) -Wl,-Map,archos.map