From 8b0c007ad990aa27d9868da49215fd1076ac77cc Mon Sep 17 00:00:00 2001 From: kpfleming Date: Mon, 21 Aug 2006 02:11:39 +0000 Subject: merge new_loader_completion branch, including (at least): - restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b --- Makefile.rules | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index 47a92a5a9..0c2b97d62 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -15,6 +15,8 @@ # Prefixing one or the other with @\# or @ or nothing makes the desired # behaviour. ECHO_PREFIX prefixes the comment, CMD_PREFIX prefixes the command. +include $(ASTTOPDIR)/makeopts + ifeq ($(NOISY_BUILD),) ECHO_PREFIX=@ CMD_PREFIX=@ @@ -23,6 +25,17 @@ else CMD_PREFIX= endif +ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) +# More GSM codec optimization +# Uncomment to enable MMXTM optimizations for x86 architecture CPU's +# which support MMX instructions. This should be newer pentiums, +# ppro's, etc, as well as the AMD K6 and K7. +#K6OPT=-DK6OPT + +OPTIMIZE?=-O6 +CFLAGS+=$(OPTIMIZE) +endif + define ast_make_o_c $(1): $(2) $(ECHO_PREFIX) echo " [CC] $$< -> $$@" @@ -50,13 +63,13 @@ endef define ast_make_so_o $(1): $(2) $(ECHO_PREFIX) echo " [LD] $$^ -> $$@" - $(CMD_PREFIX) $$(CC) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS) + $(CMD_PREFIX) $$(CC) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS) endef define ast_make_so_oo $(1): $(2) $(ECHO_PREFIX) echo " [LDXX] $$^ -> $$@" - $(CMD_PREFIX) $$(CXX) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS) + $(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS) endef define ast_make_a_o @@ -69,13 +82,13 @@ endef define ast_make_final $(1): $(2) $(ECHO_PREFIX) echo " [LD] $$^ -> $$@" - $(CMD_PREFIX) $$(CC) -o $$@ $$(LDFLAGS) $$^ $$(LIBS) + $(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$^ $$(LIBS) endef define ast_make_final_host $(1): $(2) $(ECHO_PREFIX) echo " [LD] $$^ -> $$@" - $(CMD_PREFIX) $$(HOST_CC) -o $$@ $$(CFLAGS) $$(LDFLAGS) $$^ $$(LIBS) + $(CMD_PREFIX) $$(HOST_CC) $$(STATIC_BUILD) -o $$@ $$(CFLAGS) $$(LDFLAGS) $$^ $$(LIBS) endef $(eval $(call ast_make_o_c,%.o,%.c)) @@ -84,8 +97,6 @@ $(eval $(call ast_make_oo_cc,%.oo,%.cc)) $(eval $(call ast_make_so_o,%.so,%.o)) -$(eval $(call ast_make_so_oo,%.so,%.oo)) - $(eval $(call ast_make_final,%,%.o)) $(eval $(call ast_make_c_y,%.c,%.y)) -- cgit v1.2.3