diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-12-14 22:00:06 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-12-14 22:00:06 +0000 |
commit | 6b8f0b0267eacf8837bdb60fb6be162a07cd7cff (patch) | |
tree | a5da49a7e8a60ac2a7f3fbdcf3b72a53b5b11dde /rbutil/libtools.make | |
parent | 29937388fd372bc2e36a5dd317deea526fee4812 (diff) |
mkmpioboot: use common Makefile.
Extend common libtools.make with libucl dependency, which will be needed by
other tools as well. Update mkmpioboot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31259 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/libtools.make')
-rw-r--r-- | rbutil/libtools.make | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/rbutil/libtools.make b/rbutil/libtools.make index 1e5a297f79..d9ead7072d 100644 --- a/rbutil/libtools.make +++ b/rbutil/libtools.make @@ -58,11 +58,28 @@ all: $(BINARY) OBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR),$(notdir $(SOURCES)))) LIBOBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR),$(notdir $(LIBSOURCES)))) +# additional link dependencies for the standalone executable +# extra dependencies: libucl +LIBUCL = libucl$(RBARCH).a +$(LIBUCL): $(OBJDIR)$(LIBUCL) + +$(OBJDIR)$(LIBUCL): + $(SILENT)$(MAKE) -C $(TOP)/../tools/ucl/src TARGET_DIR=$(OBJDIR) $@ + +# building the standalone executable +$(BINARY): $(OBJS) $(EXTRADEPS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) + @echo LD $@ +# $(SILENT)mkdir -p $(dir $@) +# EXTRADEPS need to be built into OBJDIR. + $(SILENT)$(CROSS)$(CC) $(CFLAGS) -o $(BINARY) $(OBJS) $(addprefix $(OBJDIR),$(EXTRADEPS)) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) + +# common rules $(OBJDIR)%.o: %.c @echo CC $< $(SILENT)mkdir -p $(dir $@) $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $< +# lib rules lib$(OUTPUT)$(RBARCH).a: $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a lib$(OUTPUT)$(RBARCH): $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a @@ -71,14 +88,6 @@ $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALI $(SILENT)mkdir -p $(dir $@) $(SILENT)$(AR) rucs $@ $^ - -# building the standalone executable -$(BINARY): $(OBJS) $(EXTRADEPS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) - @echo LD $@ -# $(SILENT)mkdir -p $(dir $@) -# EXTRADEPS need to be built into OBJDIR. - $(SILENT)$(CROSS)$(CC) $(CFLAGS) -o $(BINARY) $(OBJS) $(addprefix $(OBJDIR),$(EXTRADEPS)) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) - # some trickery to build ppc and i386 from a single call ifeq ($(RBARCH),) $(TARGET_DIR)lib$(OUTPUT)i386.a: |