summaryrefslogtreecommitdiff
path: root/apps/plugins/Makefile
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-03-06 15:42:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-03-06 15:42:06 +0000
commit2d493de67144b2df78eafa13090fbdd790a99771 (patch)
treefab9c712cc85dbf615ab05f846c28ed11569ed72 /apps/plugins/Makefile
parent8ebff817a29d8e3fed2602f29fc649d2a3261ebc (diff)
downloadrockbox-2d493de67144b2df78eafa13090fbdd790a99771.zip
rockbox-2d493de67144b2df78eafa13090fbdd790a99771.tar.gz
rockbox-2d493de67144b2df78eafa13090fbdd790a99771.tar.bz2
rockbox-2d493de67144b2df78eafa13090fbdd790a99771.tar.xz
Oops. I didn't mean to commit this just yet, this is work in progress.
Reverting this until tested further. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6153 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r--apps/plugins/Makefile23
1 files changed, 9 insertions, 14 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile
index c19843d..7d8f0c3 100644
--- a/apps/plugins/Makefile
+++ b/apps/plugins/Makefile
@@ -1,3 +1,6 @@
+? Makefile.tmpl
+? lib/Makefile.tmpl
+? lib/dep-pluginlib
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
@@ -24,9 +27,8 @@ LDS := plugin.lds
LINKFILE := $(OBJDIR)/pluginlink.lds
DEPFILE = $(OBJDIR)/dep-plugins
-# This sets up 'SRC' based on the files mentioned in SOURCES
-include $(TOOLSDIR)/makesrc.inc
-
+SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
+ $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - )
ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock)
SOURCES = $(SRC)
ELFS := $(SRC:%.c=$(OBJDIR)/%.elf)
@@ -35,8 +37,6 @@ OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DEFS := $(SRC:%.c=$(OBJDIR)/%.def)
DIRS = .
-ELFDEP = $(OBJDIR)/dep-elf
-
#for any recorder and iRiver model
ifneq (,$(strip $(foreach tgt,RECORDER IRIVER,$(findstring $(tgt),$(TARGET)))))
SUBDIRS += rockboy
@@ -46,14 +46,9 @@ endif
all: $(OBJDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
ifndef SIMVER
-
-ELFIT=@echo "LD $@"; \
- $(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(OBJDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map
-
-$(ELFDEP): $(SOURCES)
- perl elfdep.pl > $(ELFDEP)
-
--include $(ELFDEP)
+$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(OBJDIR)/libplugin.a
+ @echo "LD $@"
+ @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(OBJDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map
$(OBJDIR)/%.rock : $(OBJDIR)/%.elf
@echo "OBJCOPY $<"
@@ -117,7 +112,7 @@ $(SUBDIRS):
clean:
@echo "cleaning plugins"
@rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
- $(OBJS) $(DEFS) $(ELFDEP)
+ $(OBJS) $(DEFS)
@$(MAKE) -C lib clean
@$(MAKE) -C rockboy clean