diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-05-14 13:45:58 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-05-14 13:45:58 +0000 |
commit | 20dab8c59caa7d2601c74944cbe0e82485df2f6e (patch) | |
tree | 2d4a534f8136e3c629938ca9f162a34ed2113a3a /firmware/Makefile | |
parent | e6564e2005d12510b3c4159b049de0b774667cbb (diff) | |
download | rockbox-20dab8c59caa7d2601c74944cbe0e82485df2f6e.tar.gz rockbox-20dab8c59caa7d2601c74944cbe0e82485df2f6e.zip |
Now creates librockbox.a instead of archos.mod
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@577 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/Makefile')
-rw-r--r-- | firmware/Makefile | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/firmware/Makefile b/firmware/Makefile index efa7c59b4e..62bb9f98da 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -20,36 +20,22 @@ 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 | ||
23 | CFLAGS = -Os -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) -DDEBUG | 23 | CFLAGS = -Os -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) -DDEBUG |
24 | AFLAGS += -small -relax | 24 | AFLAGS += -small -relax |
25 | 25 | ||
26 | SRC := $(wildcard drivers/*.c common/*.c *.c) | 26 | SRC := $(wildcard drivers/*.c common/*.c malloc/*.c *.c) |
27 | OBJS := $(SRC:%.c=%.o) crt0.o | 27 | OBJS := $(SRC:%.c=%.o) crt0.o |
28 | DEPS:=.deps | ||
29 | DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc | ||
28 | 30 | ||
29 | all : archos.mod # archos.asm | ||
30 | |||
31 | archos.elf : $(OBJS) app.lds | ||
32 | $(CC) -nostdlib -o archos.elf $(OBJS) -lgcc -lc -Tapp.lds -Wl,-Map,archos.map | ||
33 | |||
34 | archos.bin : archos.elf | ||
35 | $(OC) -O binary archos.elf archos.bin | ||
36 | |||
37 | archos.asm: archos.bin | ||
38 | ../tools/sh2d -sh1 archos.bin > archos.asm | ||
39 | |||
40 | archos.mod : archos.bin | ||
41 | ../tools/scramble archos.bin archos.mod | ||
42 | 31 | ||
43 | dist: | 32 | librockbox.a: $(OBJS) |
44 | tar czvf dist.tar.gz Makefile main.c start.s app.lds | 33 | $(AR) ruv $@ $+ |
45 | 34 | ||
46 | clean: | 35 | clean: |
47 | -rm -f *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~ | 36 | -rm -f $(OBJS) *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~ |
48 | -$(RM) -r $(DEPS) | 37 | -$(RM) -r $(DEPS) |
49 | 38 | ||
50 | DEPS:=.deps | ||
51 | DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common | ||
52 | |||
53 | $(DEPS)/%.d: %.c | 39 | $(DEPS)/%.d: %.c |
54 | @$(SHELL) -c 'for d in $(DEPDIRS); do { if [ ! -d $$d ]; then mkdir $$d; fi; }; done' | 40 | @$(SHELL) -c 'for d in $(DEPDIRS); do { if [ ! -d $$d ]; then mkdir $$d; fi; }; done' |
55 | @echo "Updating dependencies for $<" | 41 | @echo "Updating dependencies for $<" |