summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-18 20:59:37 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-18 20:59:37 +0000
commit8e8e47fc92f6dc46c25cc4d56ea280fc3060f124 (patch)
tree8f237b4c00d788a8c49e11fefd72e8afa19e53ad /Makerules
parent5cc8e24806a0a85ac2df70a83e4861a61b2b3652 (diff)
modify IMA compiling rule and add linking rule
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makerules b/Makerules
index b00623088..8ec9c3c58 100644
--- a/Makerules
+++ b/Makerules
@@ -82,7 +82,7 @@ disp_ld = $($(DISP)_disp_ld)
cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@))
cmd_compile.S = $(cmd_compile.c) $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
-cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $@)) $(CFLAGS-multi-y)
+cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(CFLAGS-multi-y)
cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
cmd_ar = $(AR) $(ARFLAGS) $@ $^
@@ -116,6 +116,17 @@ define link.so
$(Q)$(LN) -sf $(1) $@
endef
+define linkm.so
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
+ @$(disp_ld)
+ $(Q)$(LD) $(LDFLAGS-$(notdir $@)) -soname=$(notdir $@).$(2) \
+ -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) $(firstword $^) \
+ $(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
+ $(Q)$(LN) -sf $(1) $@.$(2)
+ $(Q)$(LN) -sf $(1) $@
+endef
+
CFLAGS-.os+=$(PICFLAG)
CFLAGS-.oS+=$(PICFLAG) -DSHARED