aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-21 02:11:39 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-21 02:11:39 +0000
commit8b0c007ad990aa27d9868da49215fd1076ac77cc (patch)
tree270b9c46c1e644483d6d2a35b509f43218ba3252 /Makefile.rules
parenta42edc84034f91932a3e12d503e07f76a6eb498a (diff)
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
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules23
1 files changed, 17 insertions, 6 deletions
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))