[Asterisk-cvs] asterisk-addons Makefile,1.11,1.12

kpfleming at lists.digium.com kpfleming at lists.digium.com
Mon Jun 20 21:33:40 CDT 2005


Update of /usr/cvsroot/asterisk-addons
In directory mongoose.digium.com:/tmp/cvs-serv2643

Modified Files:
	Makefile 
Log Message:
fix builds on Mac OS X (bug #4426, take two)


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/Makefile,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Makefile	27 Apr 2005 01:31:18 -0000	1.11
+++ Makefile	21 Jun 2005 01:34:31 -0000	1.12
@@ -39,6 +39,15 @@
 MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi)
 MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi)
 
+ifeq (${OSARCH},Darwin)
+SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
+else
+SOLINK=-shared -Xlinker -x
+endif
+ifeq (${OSARCH},SunOS)
+SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
+endif
+
 all: depend $(MODS)
 
 format_mp3/format_mp3.so:
@@ -59,13 +68,13 @@
 endif
 
 cdr_addon_mysql.so: cdr_addon_mysql.o
-	$(CC) -shared -Xlinker -x -o $@ $< -lmysqlclient -lz $(MLFLAGS)
+	$(CC) $(SOLINK) -o $@ $< -lmysqlclient -lz $(MLFLAGS)
 
 res_config_mysql.so: res_config_mysql.o
-	$(CC) -shared -Xlinker -x -o $@ $< -lmysqlclient -lz $(MLFLAGS)
+	$(CC) $(SOLINK) -o $@ $< -lmysqlclient -lz $(MLFLAGS)
 
 app_addon_sql_mysql.so: app_addon_sql_mysql.o
-	$(CC) -shared -Xlinker -x -o $@ $< -lmysqlclient -lz $(MLFLAGS)
+	$(CC) $(SOLINK) -o $@ $< -lmysqlclient -lz $(MLFLAGS)
 
 depend: .depend
 




More information about the svn-commits mailing list