and this is the last one to have asterisk compile (not run yet)
authorLuigi Rizzo <rizzo@icir.org>
Sat, 17 Nov 2007 11:10:16 +0000 (11:10 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Sat, 17 Nov 2007 11:10:16 +0000 (11:10 +0000)
natively under cygwin.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89375 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile.moddir_rules

index be44ddc..acc2228 100644 (file)
@@ -43,11 +43,12 @@ include $(ASTTOPDIR)/Makefile.rules
 $(addsuffix .oo,$(CC_MODS)) $(addsuffix .o,$(C_MODS)): \
        ASTCFLAGS+= -DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
 
-# For loadable modules, pass _LIB and _LDFLAGS from menuselect.
-ifneq ($(OSARCH),mingw32)       # -fPIC is default on mingw32 and cygwin
-$(LOADABLE_MODS:%=%.so): ASTCFLAGS+=-fPIC
+ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
+   # don't define -fPIC on mingw32 and cygwin, it is the default
+   $(LOADABLE_MODS:%=%.so): ASTCFLAGS+=-fPIC
 endif
 
+# For loadable modules, pass _LIB and _LDFLAGS from menuselect.
 $(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
 $(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))