diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-17 21:28:41 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-17 21:28:41 +0000 |
commit | 76d780f47e7bcbbc8a60c3958f02c84537b38e8f (patch) | |
tree | ff7a55583b5fef9db75b00726af373b6a8a02edc /Makerules | |
parent | 15870aba4909395d3922acb81dba0ebdcc4361a0 (diff) |
Add link.so, add support for CFLAGS-$(subdir), where subdir is the last part of dir, or the full path relativ to top_srcdir, remove *CPPFLAGS, not used, remove $< from multi, unusable
Diffstat (limited to 'Makerules')
-rw-r--r-- | Makerules | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -63,10 +63,10 @@ disp_strip = $($(DISP)_disp_strip) disp_ar = $($(DISP)_disp_ar) disp_ld = $($(DISP)_disp_ld) -cmd_compile.c = $(CC) -c $< -o $@ $(CPPFLAGS) $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $@)) $(CFLAGS-$(notdir $<)) -cmd_compile.S = $(cmd_compile.c) $(S_CPPFLAGS) $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $@)) $(ASFLAGS-$(notdir $<)) +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 $@ $(CPPFLAGS) $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $@)) $(CFLAGS-$(notdir $<)) $(CFLAGS-multi-y) +cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $@)) $(CFLAGS-multi-y) cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^ cmd_ar = $(AR) $(ARFLAGS) $@ $^ @@ -78,6 +78,18 @@ compile-m = @$(disp_compile-m) ; $(cmd_compile-m) do_strip = @$(disp_strip) ; $(cmd_strip) do_ar = @$(disp_ar) ; $(cmd_ar) +define link.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 $@)) \ + --whole-archive $(firstword $^) --no-whole-archive \ + $(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@)) + $(Q)$(LN) -sf $(1) $@.$(2) + $(Q)$(LN) -sf $(1) $@ +endef + CFLAGS-.os+=$(PICFLAG) CFLAGS-.oS+=$(PICFLAG) -DSHARED |