diff options
Diffstat (limited to 'flash/bootbox/Makefile')
-rw-r--r-- | flash/bootbox/Makefile | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/flash/bootbox/Makefile b/flash/bootbox/Makefile deleted file mode 100644 index 754f95dd49..0000000000 --- a/flash/bootbox/Makefile +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(OBJDIR) \ | ||
11 | -I$(BUILDDIR) | ||
12 | |||
13 | DEPFILE = $(OBJDIR)/dep-bootbox | ||
14 | LDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds | ||
15 | |||
16 | ifdef DEBUG | ||
17 | DEFINES := -DDEBUG | ||
18 | CFLAGS += -g | ||
19 | endif | ||
20 | |||
21 | SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - ) | ||
22 | DIRS = . | ||
23 | |||
24 | ifdef APPEXTRA | ||
25 | DIRS += $(subst :, ,$(APPEXTRA)) | ||
26 | INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA))) | ||
27 | endif | ||
28 | |||
29 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \ | ||
30 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} | ||
31 | |||
32 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
33 | SOURCES = $(SRC) | ||
34 | LINKFILE = $(OBJDIR)/linkage.lds | ||
35 | MAXINFILE = $(OBJDIR)/romstart.temp | ||
36 | MAXOUTFILE = $(OBJDIR)/romstart | ||
37 | |||
38 | LIBROCKBOX = $(BUILDDIR)/librockbox.a | ||
39 | |||
40 | all: $(BUILDDIR)/$(BINARY) $(FLASHFILE) | ||
41 | |||
42 | dep: $(DEPFILE) | ||
43 | |||
44 | $(LINKFILE): $(LDS) | ||
45 | $(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ | ||
46 | |||
47 | $(MAXOUTFILE): | ||
48 | $(SILENT)echo '#include "config.h"' > $(MAXINFILE) | ||
49 | $(SILENT)echo "ROM_START" >> $(MAXINFILE) | ||
50 | $(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE) | ||
51 | $(SILENT)rm $(MAXINFILE) | ||
52 | |||
53 | $(OBJDIR)/bootbox.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) | ||
54 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootbox.map | ||
55 | |||
56 | $(OBJDIR)/bootbox.bin : $(OBJDIR)/bootbox.elf | ||
57 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
58 | |||
59 | $(OBJDIR)/bootbox.asm: $(OBJDIR)/bootbox.bin | ||
60 | $(TOOLSDIR)/sh2d -sh1 $< > $@ | ||
61 | |||
62 | $(BUILDDIR)/$(BINARY) : $(OBJDIR)/bootbox.bin | ||
63 | $(call PRINTS,Build bootbox file)$(MKFIRMWARE) $< $@ | ||
64 | |||
65 | $(FLASHFILE): $(OBJDIR)/bootbox.bin | ||
66 | $(call PRINTS,UCLPACK bootbox)$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1; | ||
67 | |||
68 | include $(TOOLSDIR)/make.inc | ||
69 | |||
70 | clean: | ||
71 | $(call PRINTS,cleaning bootbox)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootbox.asm $(OBJDIR)/rockbox.ucl \ | ||
72 | $(OBJDIR)/bootbox.bin $(OBJDIR)/bootbox.elf $(OBJDIR)/*.map \ | ||
73 | $(LINKFILE) $(MAXOUTFILE) $(DEPFILE) $(FLASHFILE) | ||
74 | |||
75 | -include $(DEPFILE) | ||