diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-05-17 19:52:56 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-05-17 19:52:56 +0000 |
commit | 7f64303420e4883819d6b41129e6cdb1baf843c4 (patch) | |
tree | c96d7029fbfb87d74cbabd4c1b3c6e81c27a4105 /apps/Makefile | |
parent | e324db6e1e650c5ae4c7a3cf17861ccc644e3723 (diff) | |
download | rockbox-7f64303420e4883819d6b41129e6cdb1baf843c4.tar.gz rockbox-7f64303420e4883819d6b41129e6cdb1baf843c4.zip |
Added DEBUG option, enabling support for gdb stub
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@627 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/Makefile')
-rw-r--r-- | apps/Makefile | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/apps/Makefile b/apps/Makefile index df7005ea40..de97bead7b 100644 --- a/apps/Makefile +++ b/apps/Makefile | |||
@@ -18,20 +18,27 @@ FIRMWARE := ../firmware | |||
18 | INCLUDES= -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers | 18 | INCLUDES= -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers |
19 | 19 | ||
20 | # Pick a target to build for | 20 | # Pick a target to build for |
21 | TARGET = -DARCHOS_PLAYER=1 | 21 | #TARGET = -DARCHOS_PLAYER=1 |
22 | #TARGET = -DARCHOS_PLAYER_OLD=1 | 22 | TARGET = -DARCHOS_PLAYER_OLD=1 |
23 | #TARGET = -DARCHOS_RECORDER=1 | 23 | #TARGET = -DARCHOS_RECORDER=1 |
24 | 24 | ||
25 | CFLAGS = -Os -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) -DDEBUG | 25 | ifdef DEBUG |
26 | DEFINES := -DDEBUG | ||
27 | LDS := $(FIRMWARE)/gdb.lds | ||
28 | else | ||
29 | LDS := $(FIRMWARE)/app.lds | ||
30 | endif | ||
31 | |||
32 | CFLAGS = -O -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES) | ||
26 | AFLAGS += -small -relax | 33 | AFLAGS += -small -relax |
27 | 34 | ||
28 | SRC := $(wildcard drivers/*.c common/*.c *.c) | 35 | SRC := $(wildcard drivers/*.c common/*.c *.c) |
29 | OBJS := $(SRC:%.c=%.o) $(FIRMWARE)/crt0.o | 36 | OBJS := $(SRC:%.c=%.o) |
30 | 37 | ||
31 | all : archos.mod # archos.asm | 38 | all : archos.mod # archos.asm |
32 | 39 | ||
33 | archos.elf : $(OBJS) $(FIRMWARE)/app.lds | 40 | archos.elf : $(OBJS) $(LDS) $(FIRMWARE)/librockbox.a |
34 | $(CC) -nostdlib -o archos.elf $(OBJS) -lrockbox -lgcc -lc -L$(FIRMWARE) -T$(FIRMWARE)/app.lds -Wl,-Map,archos.map | 41 | $(CC) -Os -nostdlib -o archos.elf $(OBJS) -lrockbox -lgcc -lc -L$(FIRMWARE) -T$(LDS) -Wl,-Map,archos.map |
35 | 42 | ||
36 | archos.bin : archos.elf | 43 | archos.bin : archos.elf |
37 | $(OC) -O binary archos.elf archos.bin | 44 | $(OC) -O binary archos.elf archos.bin |
@@ -49,8 +56,6 @@ clean: | |||
49 | -rm -f *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~ | 56 | -rm -f *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~ |
50 | -$(RM) -r $(DEPS) | 57 | -$(RM) -r $(DEPS) |
51 | 58 | ||
52 | crt0.o: $(FIRMWARE)/crt0.S | ||
53 | |||
54 | DEPS:=.deps | 59 | DEPS:=.deps |
55 | DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common | 60 | DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common |
56 | 61 | ||