aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-20 07:42:38 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-20 07:42:38 +0000
commite87c861cca7aef09199bb8b819005d20ad89f5c2 (patch)
treecb64e700e1040267448bb24b011a72e795522c4e
parent594f71fdcb8a6414006471ccf30d06d6dd4ad24d (diff)
initial makefile changes to build loadable modules under cygwin
(not complete yet - still need to sort out dependecies on res_*) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89443 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile6
-rw-r--r--Makefile.moddir_rules7
-rw-r--r--main/Makefile2
3 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 7730cdf9b..538ef8e68 100644
--- a/Makefile
+++ b/Makefile
@@ -277,10 +277,6 @@ ifeq ($(OSARCH),SunOS)
SOLINK=-shared -fpic -L/usr/local/ssl/lib
endif
-ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
- SOLINK=-Xlinker -r
-endif
-
# This is used when generating the doxygen documentation
ifneq ($(DOT),:)
HAVEDOT=yes
@@ -298,7 +294,7 @@ else
endif
# comment to print directories during submakes
-PRINT_DIR:= --no-print-directory
+PRINT_DIR?= --no-print-directory
all: _all
@echo " +--------- Asterisk Build Complete ---------+"
diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index 17924be56..54113de74 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -63,6 +63,13 @@ modules.link: $(addsuffix .eo,$(filter $(EMBEDDED_MODS),$(C_MODS)))
ifneq ($(LOADABLE_MODS),)
_all: $(LOADABLE_MODS:%=%.so)
+ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
+ # linker options and extra libraries for cygwin
+ SOLINK=-Wl,--out-implib=lib$@.a -shared
+ LIBS+=-L../main -lasterisk -L../res
+ # additional libraries in res/
+ LIBS_RES:= -lres_monitor -lres_adsi -lres_features
+endif
endif
ifneq ($(EMBEDDED_MODS),)
diff --git a/main/Makefile b/main/Makefile
index 9790b5c04..b9894e7ab 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -87,7 +87,7 @@ endif
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
AST_LIBS+=-lminires -ldl
- ASTLINK+= -shared -Wl,--out-implib,asterisk.dll
+ ASTLINK+= -shared -Wl,--out-implib,libasterisk.a
endif
ifeq ($(OSARCH),NetBSD)
AST_LIBS+=-lpthread -lcrypto -lm -L/usr/pkg/lib $(EDITLINE_LIB)