diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-03-06 15:40:03 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-03-06 15:40:03 +0000 |
commit | 8ebff817a29d8e3fed2602f29fc649d2a3261ebc (patch) | |
tree | ac9457a2e251cb54e8668b11a531114baed53b87 /apps/plugins/Makefile | |
parent | e566eede94eb673813bcc017207504a7c48893ad (diff) | |
download | rockbox-8ebff817a29d8e3fed2602f29fc649d2a3261ebc.tar.gz rockbox-8ebff817a29d8e3fed2602f29fc649d2a3261ebc.zip |
Use the new generic SRC build "macro" in tools/makesrc.inc to process the
SOURCES file. Hopefully this now works better for Mac OS X people.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6152 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r-- | apps/plugins/Makefile | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile index fdabc8cf22..c19843d979 100644 --- a/apps/plugins/Makefile +++ b/apps/plugins/Makefile | |||
@@ -24,8 +24,9 @@ LDS := plugin.lds | |||
24 | LINKFILE := $(OBJDIR)/pluginlink.lds | 24 | LINKFILE := $(OBJDIR)/pluginlink.lds |
25 | DEPFILE = $(OBJDIR)/dep-plugins | 25 | DEPFILE = $(OBJDIR)/dep-plugins |
26 | 26 | ||
27 | SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ | 27 | # This sets up 'SRC' based on the files mentioned in SOURCES |
28 | $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) | 28 | include $(TOOLSDIR)/makesrc.inc |
29 | |||
29 | ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock) | 30 | ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock) |
30 | SOURCES = $(SRC) | 31 | SOURCES = $(SRC) |
31 | ELFS := $(SRC:%.c=$(OBJDIR)/%.elf) | 32 | ELFS := $(SRC:%.c=$(OBJDIR)/%.elf) |
@@ -34,6 +35,8 @@ OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | |||
34 | DEFS := $(SRC:%.c=$(OBJDIR)/%.def) | 35 | DEFS := $(SRC:%.c=$(OBJDIR)/%.def) |
35 | DIRS = . | 36 | DIRS = . |
36 | 37 | ||
38 | ELFDEP = $(OBJDIR)/dep-elf | ||
39 | |||
37 | #for any recorder and iRiver model | 40 | #for any recorder and iRiver model |
38 | ifneq (,$(strip $(foreach tgt,RECORDER IRIVER,$(findstring $(tgt),$(TARGET))))) | 41 | ifneq (,$(strip $(foreach tgt,RECORDER IRIVER,$(findstring $(tgt),$(TARGET))))) |
39 | SUBDIRS += rockboy | 42 | SUBDIRS += rockboy |
@@ -43,9 +46,14 @@ endif | |||
43 | all: $(OBJDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) | 46 | all: $(OBJDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) |
44 | 47 | ||
45 | ifndef SIMVER | 48 | ifndef SIMVER |
46 | $(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(OBJDIR)/libplugin.a | 49 | |
47 | @echo "LD $@" | 50 | ELFIT=@echo "LD $@"; \ |
48 | @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(OBJDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map | 51 | $(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(OBJDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map |
52 | |||
53 | $(ELFDEP): $(SOURCES) | ||
54 | perl elfdep.pl > $(ELFDEP) | ||
55 | |||
56 | -include $(ELFDEP) | ||
49 | 57 | ||
50 | $(OBJDIR)/%.rock : $(OBJDIR)/%.elf | 58 | $(OBJDIR)/%.rock : $(OBJDIR)/%.elf |
51 | @echo "OBJCOPY $<" | 59 | @echo "OBJCOPY $<" |
@@ -109,7 +117,7 @@ $(SUBDIRS): | |||
109 | clean: | 117 | clean: |
110 | @echo "cleaning plugins" | 118 | @echo "cleaning plugins" |
111 | @rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ | 119 | @rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ |
112 | $(OBJS) $(DEFS) | 120 | $(OBJS) $(DEFS) $(ELFDEP) |
113 | @$(MAKE) -C lib clean | 121 | @$(MAKE) -C lib clean |
114 | @$(MAKE) -C rockboy clean | 122 | @$(MAKE) -C rockboy clean |
115 | 123 | ||