build: Use portable abstraction for linker/hostcc output file syntax

pull/28/head
Diego Biurrun 13 years ago
parent d5683aba5a
commit 8f7c26e392
  1. 4
      Makefile
  2. 2
      common.mak
  3. 4
      library.mak

@ -91,7 +91,7 @@ FF_DEP_LIBS := $(DEP_LIBS)
all: $(PROGS) all: $(PROGS)
$(TOOLS): %$(EXESUF): %.o $(TOOLS): %$(EXESUF): %.o
$(LD) $(LDFLAGS) -o $@ $< $(ELIBS) $(LD) $(LDFLAGS) $(LD_O) $< $(ELIBS)
tools/cws2fws$(EXESUF): ELIBS = -lz tools/cws2fws$(EXESUF): ELIBS = -lz
@ -135,7 +135,7 @@ endef
$(foreach P,$(PROGS-yes),$(eval $(call DOPROG,$(P)))) $(foreach P,$(PROGS-yes),$(eval $(call DOPROG,$(P))))
$(PROGS): %$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS) $(PROGS): %$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) -o $@ $(OBJS-$*) cmdutils.o $(FF_EXTRALIBS) $(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) cmdutils.o $(FF_EXTRALIBS)
OBJDIRS += tools OBJDIRS += tools

@ -38,7 +38,7 @@ $(HOSTOBJS): %.o: %.c
$(call COMPILE,HOSTCC) $(call COMPILE,HOSTCC)
$(HOSTPROGS): %$(HOSTEXESUF): %.o $(HOSTPROGS): %$(HOSTEXESUF): %.o
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS) $(HOSTCC) $(HOSTLDFLAGS) $(HOSTCC_O) $< $(HOSTLIBS)
$(OBJS): | $(sort $(dir $(OBJS))) $(OBJS): | $(sort $(dir $(OBJS)))
$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS))) $(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))

@ -35,14 +35,14 @@ install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
define RULES define RULES
$(EXAMPLES) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o $(EXAMPLES) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
$$(LD) $(LDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) $$(LD) $(LDFLAGS) $$(LD_O) $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
$(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME) $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS) $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
$(SLIB_CREATE_DEF_CMD) $(SLIB_CREATE_DEF_CMD)
$$(LD) $(SHFLAGS) $(LDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS) $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
$(SLIB_EXTRA_CMD) $(SLIB_EXTRA_CMD)
clean:: clean::

Loading…
Cancel
Save