diff --git a/Makefile.am b/Makefile.am index e100324d52..7591f04245 100644 --- a/Makefile.am +++ b/Makefile.am @@ -150,7 +150,7 @@ modules: libfreeswitch.la @./build/addenv.sh build/freeswitch.env OSARCH "$(OSARCH)" @./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)" @./build/addenv.sh build/freeswitch.env SOLINK "$(SOLINK)" - @./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) -lfreeswitch" + @./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) $(MOD_LINK)" @./build/addenv.sh build/freeswitch.env CFLAGS "$(AM_CFLAGS)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" @./build/addenv.sh build/freeswitch.env CFGARGS "$(AM_CFGARGS)" @@ -203,7 +203,7 @@ install_mod: modules @./build/addenv.sh build/freeswitch.env BASE "$(switch_srcdir)" @./build/addenv.sh build/freeswitch.env OSARCH "$(OSARCH)" @./build/addenv.sh build/freeswitch.env SOLINK "$(SOLINK)" - @./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) -lfreeswitch" + @./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) $(MOD_LINK)" @./build/addenv.sh build/freeswitch.env CFLAGS "$(AM_CFLAGS)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" @./build/addenv.sh build/freeswitch.env LINK "$(LINK)" diff --git a/configure.in b/configure.in index cc71525654..8b9ad00648 100644 --- a/configure.in +++ b/configure.in @@ -284,4 +284,23 @@ AC_CONFIG_SUBDIRS(libs/libteletone) AC_CONFIG_SUBDIRS(libs/pcre) AC_CONFIG_SUBDIRS(libs/apr) AC_CONFIG_SUBDIRS(libs/apr-util) +AC_CONFIG_SUBDIRS(libs/codec/g7xx) +AC_CONFIG_SUBDIRS(libs/codec/g726) +AC_CONFIG_SUBDIRS(libs/codec/gsm) +AC_CONFIG_SUBDIRS(libs/codec/ilbc) +AC_CONFIG_SUBDIRS(libs/codec/lpc10) +AC_CONFIG_SUBDIRS(libs/curl) +AC_CONFIG_SUBDIRS(libs/iax) +AC_CONFIG_SUBDIRS(libs/iksemel) +AC_CONFIG_SUBDIRS(libs/js/nsprpub) +AC_CONFIG_SUBDIRS(libs/js) +AC_CONFIG_SUBDIRS(libs/libdingaling) +AC_CONFIG_SUBDIRS(libs/libetpan) +AC_CONFIG_SUBDIRS(libs/libsndfile) +AC_CONFIG_SUBDIRS(libs/sofia-sip) +AC_CONFIG_SUBDIRS(libs/speex) +AC_CONFIG_SUBDIRS(libs/xmlrpc-c) +AC_CONFIG_SUBDIRS(libs/portaudio) + + AC_OUTPUT([src/include/switch_version.h]) diff --git a/src/mod/applications/mod_enum/Makefile b/src/mod/applications/mod_enum/Makefile index d5fd3328c4..4398529a88 100644 --- a/src/mod/applications/mod_enum/Makefile +++ b/src/mod/applications/mod_enum/Makefile @@ -1,21 +1,20 @@ CFLAGS += -I$(BASE)/libs/udns -LDFLAGS += -L$(BASE)/libs/udns -ludns LINKER=$(CC) all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) udns + cd $(BASE)/libs/udns && $(MAKE) staticlib %.o: %.c $(CC) -fPIC $(CFLAGS) -c -o $@ $< $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) $(BASE)/libs/udns/libudns.a clean: rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/asr_tts/mod_cepstral/Makefile b/src/mod/asr_tts/mod_cepstral/Makefile index 304faa336c..4165b06cbc 100644 --- a/src/mod/asr_tts/mod_cepstral/Makefile +++ b/src/mod/asr_tts/mod_cepstral/Makefile @@ -13,11 +13,11 @@ all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_amr/Makefile b/src/mod/codecs/mod_amr/Makefile index d86dd1fcdd..67e9237b3d 100644 --- a/src/mod/codecs/mod_amr/Makefile +++ b/src/mod/codecs/mod_amr/Makefile @@ -15,10 +15,10 @@ depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_g711/Makefile b/src/mod/codecs/mod_g711/Makefile index 823b01feb7..2f9ec6a81d 100644 --- a/src/mod/codecs/mod_g711/Makefile +++ b/src/mod/codecs/mod_g711/Makefile @@ -3,13 +3,11 @@ all: $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) - - + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_g722/Makefile b/src/mod/codecs/mod_g722/Makefile index c7aecd7114..45e1bb2a53 100644 --- a/src/mod/codecs/mod_g722/Makefile +++ b/src/mod/codecs/mod_g722/Makefile @@ -1,16 +1,16 @@ -LDFLAGS +=-lg7xx +CFLAGS +=-I$(BASE)/libs/codec/g7xx/src/include/ all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install codec/g7xx --prefix=$(PREFIX) + cd $(BASE)/libs/codec/g7xx && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) $(BASE)/libs/codec/g7xx/libg7xx.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_g723_1/Makefile b/src/mod/codecs/mod_g723_1/Makefile index 0c885fec19..212c9e1993 100644 --- a/src/mod/codecs/mod_g723_1/Makefile +++ b/src/mod/codecs/mod_g723_1/Makefile @@ -14,10 +14,10 @@ depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_g726/Makefile b/src/mod/codecs/mod_g726/Makefile index 268ee99fcf..99e7ef7d16 100644 --- a/src/mod/codecs/mod_g726/Makefile +++ b/src/mod/codecs/mod_g726/Makefile @@ -1,16 +1,16 @@ -LDFLAGS +=-lg726 +CFLAGS += -I$(BASE)/libs/codec/g726/src all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install codec/g726 --prefix=$(PREFIX) + cd $(BASE)/libs/codec/g726 && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c ../../../include/switch_bitpack.h $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) $(BASE)/libs/codec/g726/libg726.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_g729/Makefile b/src/mod/codecs/mod_g729/Makefile index 16852368c0..719d947eb4 100644 --- a/src/mod/codecs/mod_g729/Makefile +++ b/src/mod/codecs/mod_g729/Makefile @@ -15,10 +15,10 @@ depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_gsm/Makefile b/src/mod/codecs/mod_gsm/Makefile index 0ee2964f5a..f94861c991 100644 --- a/src/mod/codecs/mod_gsm/Makefile +++ b/src/mod/codecs/mod_gsm/Makefile @@ -3,14 +3,15 @@ LDFLAGS +=-lgsm all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install codec/gsm --prefix=$(PREFIX) + cd $(BASE)/libs/codec/gsm && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + cd $(BASE)/libs/codec/gsm && $(MAKE) install + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_ilbc/Makefile b/src/mod/codecs/mod_ilbc/Makefile index 5c3b364244..09117fdab2 100644 --- a/src/mod/codecs/mod_ilbc/Makefile +++ b/src/mod/codecs/mod_ilbc/Makefile @@ -1,16 +1,16 @@ -LDFLAGS +=-lilbc +CFLAGS += -I$(BASE)/libs/codec/ilbc/src all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install codec/ilbc --prefix=$(PREFIX) --disable-shared + cd $(BASE)/libs/codec/ilbc && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) $(BASE)/libs/codec/ilbc/libilbc.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_lpc10/Makefile b/src/mod/codecs/mod_lpc10/Makefile index 1aa28a119b..1bf83e7cd6 100644 --- a/src/mod/codecs/mod_lpc10/Makefile +++ b/src/mod/codecs/mod_lpc10/Makefile @@ -1,16 +1,16 @@ -LDFLAGS +=-llpc10 +CFLAGS+=-I$(BASE)/libs/codec/lpc10/src all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install codec/lpc10 --prefix=$(PREFIX) + cd $(BASE)/libs/codec/lpc10 && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c ../../../include/switch_bitpack.h - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) $(BASE)/libs/codec/lpc10/liblpc10.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/codecs/mod_lpc10/mod_lpc10.c b/src/mod/codecs/mod_lpc10/mod_lpc10.c index 2b364e0a25..7bb418da47 100644 --- a/src/mod/codecs/mod_lpc10/mod_lpc10.c +++ b/src/mod/codecs/mod_lpc10/mod_lpc10.c @@ -31,7 +31,7 @@ */ #include "switch.h" -#include "lpc10/lpc10.h" +#include "lpc10.h" enum { SamplesPerFrame = 180, diff --git a/src/mod/codecs/mod_speex/Makefile b/src/mod/codecs/mod_speex/Makefile index 00a0778085..f2db5cb619 100644 --- a/src/mod/codecs/mod_speex/Makefile +++ b/src/mod/codecs/mod_speex/Makefile @@ -1,14 +1,15 @@ +CFLAGS+=-I$(BASE)/libs/speex/include all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install speex --prefix=$(PREFIX) --disable-shared --with-pic + cd $(BASE)/libs/speex && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) -lspeex + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) $(BASE)/libs/speex/libspeex/libspeex.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/endpoints/mod_dingaling/Makefile b/src/mod/endpoints/mod_dingaling/Makefile index bde26668bf..4ed8764a3e 100644 --- a/src/mod/endpoints/mod_dingaling/Makefile +++ b/src/mod/endpoints/mod_dingaling/Makefile @@ -1,19 +1,20 @@ -LDFLAGS += -ldingaling - +LDFLAGS += $(BASE)/libs/libdingaling/libdingaling.la +CFLAGS += -I$(BASE)/libs/libdingaling/src all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install iksemel --prefix=$(PREFIX) - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libdingaling --prefix=$(PREFIX) + cd $(BASE)/libs/iksemel && $(MAKE) + cd $(BASE)/libs/libdingaling && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) - + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ *.so + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + cd $(BASE)/libs/iksemel && $(MAKE) install + cd $(BASE)/libs/libdingaling && $(MAKE) install + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/endpoints/mod_iax/Makefile b/src/mod/endpoints/mod_iax/Makefile index 03e67d1f42..a15bb6a726 100644 --- a/src/mod/endpoints/mod_iax/Makefile +++ b/src/mod/endpoints/mod_iax/Makefile @@ -1,17 +1,17 @@ -LDFLAGS += -liax -L/usr/local/lib +CFLAGS += -I$(BASE)/libs/iax/src all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install iax --enable-newjb --prefix=$(PREFIX) + cd $(BASE)/libs/iax && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) $(BASE)/libs/iax/src/libiax.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/endpoints/mod_iax/mod_iax.c b/src/mod/endpoints/mod_iax/mod_iax.c index c225838d4c..e83f04d973 100644 --- a/src/mod/endpoints/mod_iax/mod_iax.c +++ b/src/mod/endpoints/mod_iax/mod_iax.c @@ -31,15 +31,11 @@ */ #include -#ifdef WIN32 #include #include #include +#ifdef WIN32 #include -#else -#include -#include -#include #endif static const char modname[] = "mod_iax"; diff --git a/src/mod/endpoints/mod_portaudio/Makefile b/src/mod/endpoints/mod_portaudio/Makefile index a465e8ca80..d187e881f6 100644 --- a/src/mod/endpoints/mod_portaudio/Makefile +++ b/src/mod/endpoints/mod_portaudio/Makefile @@ -1,22 +1,25 @@ -CFLAGS += -I. -LDFLAGS += -lportaudio -L$(PREFIX) +CFLAGS += -I. -I$(BASE)/libs/portaudio/include MYOBJS = pablio.o pa_ringbuffer.o +ifeq ($(OSARCH),Darwin) +LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon +endif all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install portaudio --prefix=$(PREFIX) --with-pic + cd $(BASE)/libs/portaudio && $(MAKE) + %.o: %.c - $(CC) -fPIC $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(MYOBJS) - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(MYOBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MYOBJS) $(LDFLAGS) $(BASE)/libs/portaudio/lib/libportaudio.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/endpoints/mod_sofia/Makefile b/src/mod/endpoints/mod_sofia/Makefile index 10be9e7102..b1cf819a51 100644 --- a/src/mod/endpoints/mod_sofia/Makefile +++ b/src/mod/endpoints/mod_sofia/Makefile @@ -1,25 +1,32 @@ OS_ARCH := $(subst /,_,$(shell uname -s | sed /\ /s//_/)) -VERSION = sofia-sip-1.12 -CFLAGS += -I. -I$(PREFIX)/include/$(VERSION) -LDFLAGS += -lsofia-sip-ua LINKER=$(CC) +CFLAGS += -I. -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/bnf -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/features +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/http -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/ipt +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/iptsec -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/msg +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/nea -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/nta +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/nth -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/nua +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/sdp -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/sip +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/soa -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/sresolv +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/stun -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/su +CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/tport -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/url + ifeq ($(OS_ARCH),Darwin) LDFLAGS +=-framework CoreFoundation -framework SystemConfiguration endif all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install sofia-sip --prefix=$(PREFIX) --with-pic --with-glib=no + cd $(BASE)/libs/sofia-sip && $(MAKE) %.o: %.c - $(CC) -fPIC $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) $(BASE)/libs/sofia-sip/libsofia-sip-ua/libsofia-sip-ua.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/endpoints/mod_wanpipe/Makefile b/src/mod/endpoints/mod_wanpipe/Makefile index 9ce1df8c80..994c61de28 100644 --- a/src/mod/endpoints/mod_wanpipe/Makefile +++ b/src/mod/endpoints/mod_wanpipe/Makefile @@ -18,11 +18,11 @@ depends: $(CC) $(CFLAGS) $(MOD_CFLAGS) -g -ggdb -Werror -fPIC -c $< -o $@ $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(OBJS) $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(OBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(OBJS) $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/event_handlers/mod_cdr/Makefile b/src/mod/event_handlers/mod_cdr/Makefile index 26f0928e1a..6a6bbaebb8 100644 --- a/src/mod/event_handlers/mod_cdr/Makefile +++ b/src/mod/event_handlers/mod_cdr/Makefile @@ -14,15 +14,15 @@ all: depends $(OBJS) $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(OBJS) $(MODNAME).cpp - $(CPPCC) $(CFLAGS) -fPIC -c $(MODNAME).cpp -o $(MODNAME).o - $(CPPCC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(CPPCC) $(CFLAGS) -c $(MODNAME).cpp -o $(MODNAME).o + $(LIBTOOL) --mode=link $(CPPCC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) %.o: %.cpp $(CPPCC) -Wall -Werror -fPIC $(CFLAGS) -c -o $@ $< clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/event_handlers/mod_xmpp_event/Makefile b/src/mod/event_handlers/mod_xmpp_event/Makefile index 5f1e6edf25..c287b001cc 100644 --- a/src/mod/event_handlers/mod_xmpp_event/Makefile +++ b/src/mod/event_handlers/mod_xmpp_event/Makefile @@ -1,4 +1,5 @@ -LDFLAGS += -liksemel -L/usr/local/lib +CFLAGS += -I$(BASE)/libs/iksemel/include +LDFLAGS += $(BASE)/libs/iksemel/src/libiksemel.la all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) @@ -6,11 +7,12 @@ depends: MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install iksemel --prefix=$(PREFIX) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + cd $(BASE)/libs/iksemel && $(MAKE) install + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/event_handlers/mod_zeroconf/Makefile b/src/mod/event_handlers/mod_zeroconf/Makefile index 36cf613ada..8c7bd95cad 100644 --- a/src/mod/event_handlers/mod_zeroconf/Makefile +++ b/src/mod/event_handlers/mod_zeroconf/Makefile @@ -9,11 +9,11 @@ depends: $(BASE)/build/buildlib.sh $(BASE) install howl-1.0.0.tar.gz --prefix=$(PREFIX) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/formats/mod_sndfile/Makefile b/src/mod/formats/mod_sndfile/Makefile index bd39fed1f3..3a9fceeed0 100644 --- a/src/mod/formats/mod_sndfile/Makefile +++ b/src/mod/formats/mod_sndfile/Makefile @@ -1,19 +1,19 @@ -LDFLAGS += -lsndfile -L/usr/local/lib +CFLAGS += -I$(BASE)/libs/libsndfile/src all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libsndfile --prefix=$(PREFIX) --disable-sqlite + cd $(BASE)/libs/libsndfile && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) $(BASE)/libs/libsndfile/src/libsndfile.la clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/languages/mod_mono/Makefile b/src/mod/languages/mod_mono/Makefile index f3a0d88eb5..2bfa4f7a96 100644 --- a/src/mod/languages/mod_mono/Makefile +++ b/src/mod/languages/mod_mono/Makefile @@ -9,20 +9,20 @@ LDFLAGS += `$(PREFIX)/bin/pkg-config --libs mono` all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(GETTEXT_TARBALL) --prefix=$(PREFIX) --with-pic - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(PKGCONFIG_TARBALL) --prefix=$(PREFIX) --with-pic - export PKG_CONFIG=$(PREFIX)/bin/pkg-config; export MSGFMT=$(PREFIX)/bin/; MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(GLIB_TARBALL) --prefix=$(PREFIX) --with-pic - export PATH=$(PATH):$(PREFIX)/bin/; MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(TARBALL) --prefix=$(PREFIX) --with-pic --with-gc=boehm --with-preview=yes --without-sigaltstack + MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) configure install $(GETTEXT_TARBALL) --prefix=$(PREFIX) --with-pic + MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) configure install $(PKGCONFIG_TARBALL) --prefix=$(PREFIX) --with-pic + export PKG_CONFIG=$(PREFIX)/bin/pkg-config; export MSGFMT=$(PREFIX)/bin/; MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) configure install $(GLIB_TARBALL) --prefix=$(PREFIX) --with-pic + export PATH=$(PATH):$(PREFIX)/bin/; MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) configure install $(TARBALL) --prefix=$(PREFIX) --with-pic --with-gc=boehm --with-preview=yes --without-sigaltstack %.o: %.c - $(CC) -fPIC $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/languages/mod_perl/Makefile b/src/mod/languages/mod_perl/Makefile index f751563828..924f2bd3f2 100644 --- a/src/mod/languages/mod_perl/Makefile +++ b/src/mod/languages/mod_perl/Makefile @@ -20,7 +20,7 @@ all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) fs_perl.$(DYNAMIC_LIB_EXTEN) depends: %.o: %.c - $(CC) -fPIC $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ reswig: rm switch_swig_wrap.c @@ -34,17 +34,17 @@ switch_swig_wrap.o: switch_swig_wrap.c fs_perl.$(DYNAMIC_LIB_EXTEN): $(MODNAME).$(DYNAMIC_LIB_EXTEN) switch_swig_wrap.o switch_swig.o - $(CC) $(SOLINK) -o fs_perl.$(DYNAMIC_LIB_EXTEN) switch_swig_wrap.o switch_swig.o $(LDFLAGS) + $(LINK) $(SOLINK) -o fs_perl.$(DYNAMIC_LIB_EXTEN) switch_swig_wrap.o switch_swig.o $(LDFLAGS) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(MODNAME).o $(OBJS) - $(CC) -fPIC $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .perlok + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .perlok .libs install: mkdir -p $(PREFIX)/perl - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod - cp -f fs_perl.$(DYNAMIC_LIB_EXTEN) fs_perl.pm $(PREFIX)/perl - if [ ! -f $(PREFIX)/perl/freeswitch.pm ] ; then cp -f freeswitch.pm $(PREFIX)/perl ; fi + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod + $(LTINSTALL) fs_perl.$(DYNAMIC_LIB_EXTEN) fs_perl.pm $(PREFIX)/perl + if [ ! -f $(PREFIX)/perl/freeswitch.pm ] ; then $(LTINSTALL) freeswitch.pm $(PREFIX)/perl ; fi diff --git a/src/mod/languages/mod_python/Makefile b/src/mod/languages/mod_python/Makefile index 84e6876409..cd28a8b888 100644 --- a/src/mod/languages/mod_python/Makefile +++ b/src/mod/languages/mod_python/Makefile @@ -14,12 +14,12 @@ depends: MAKE=$(MAKE) PY_CFLAGS=-fPIC $(BASE)/build/buildlib.sh $(BASE) install Python-2.4.3.tgz --prefix=$(PREFIX) --enable-threads %.o: %.cpp - $(CPPCC) -Wall -Werror -fPIC $(CFLAGS) -c -o $@ $< + $(CPPCC) $(CFLAGS) -c -o $@ $< %.o: %.c $(CC) $(LCFLAGS) $(CFLAGS) -c $< -o $@ -od_python.c: +mod_python.c: $(CC) $(LCFLAGS) $(CFLAGS) -c mod_python.c -o mod_python.o reswig: @@ -48,7 +48,6 @@ clean: rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ install: - # cp -f py_$(PYMOD).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod cp -f freeswitch.py $(PREFIX)/lib/python2.4/site-packages/ diff --git a/src/mod/languages/mod_spidermonkey/Makefile b/src/mod/languages/mod_spidermonkey/Makefile index 6f638c99f9..0e6741b815 100644 --- a/src/mod/languages/mod_spidermonkey/Makefile +++ b/src/mod/languages/mod_spidermonkey/Makefile @@ -1,18 +1,23 @@ +CFLAGS += -I$(BASE)/libs/curl/include +LDFLAGS += $(BASE)/libs/curl/lib/libcurl.la include sm.mak all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install js/nsprpub --prefix=$(PREFIX) --with-pic - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install js --prefix=$(PREFIX) --with-pic --with-nspr=yes - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install curl --prefix=$(PREFIX) --without-libidn + cd $(BASE)/libs/curl && $(MAKE) + cd $(BASE)/libs/js/nsprpub && $(MAKE) + cd $(BASE)/libs/js && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(MODNAME).h $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + cd $(BASE)/libs/js/nsprpub && $(MAKE) install + cd $(BASE)/libs/js && $(MAKE) install + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/languages/mod_spidermonkey/sm.mak b/src/mod/languages/mod_spidermonkey/sm.mak index 287701cefd..bc22d30933 100644 --- a/src/mod/languages/mod_spidermonkey/sm.mak +++ b/src/mod/languages/mod_spidermonkey/sm.mak @@ -1,2 +1,2 @@ -CFLAGS += -I$(PREFIX)/include/js -I$(PREFIX)/include/nspr -DXP_UNIX -I../mod_spidermonkey -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 -LDFLAGS += -lnspr4 -ljs -lcurl +CFLAGS += -I$(BASE)/libs/js/src -I$(BASE)/libs/js/nsprpub/include -DXP_UNIX -I../mod_spidermonkey -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 +LDFLAGS += -L$(BASE)/libs/js/nsprpub/pr/src -L$(BASE)/libs/js/nsprpub/dist/lib -lnspr4 $(BASE)/libs/js/libjs.la diff --git a/src/mod/languages/mod_spidermonkey_core_db/Makefile b/src/mod/languages/mod_spidermonkey_core_db/Makefile index 749b218e76..91a3b2c677 100644 --- a/src/mod/languages/mod_spidermonkey_core_db/Makefile +++ b/src/mod/languages/mod_spidermonkey_core_db/Makefile @@ -5,11 +5,11 @@ all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/languages/mod_spidermonkey_etpan/Makefile b/src/mod/languages/mod_spidermonkey_etpan/Makefile index 0d2be4a5b6..cada03a08b 100644 --- a/src/mod/languages/mod_spidermonkey_etpan/Makefile +++ b/src/mod/languages/mod_spidermonkey_etpan/Makefile @@ -1,8 +1,6 @@ include ../mod_spidermonkey/sm.mak -OBJS=#$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -letpan -LINKER=$(CC) - +LDFLAGS+=-letpan all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) @@ -10,11 +8,11 @@ depends: MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libetpan --prefix=$(PREFIX) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/languages/mod_spidermonkey_odbc/Makefile b/src/mod/languages/mod_spidermonkey_odbc/Makefile index 1e9d99ecd8..c8934bf436 100644 --- a/src/mod/languages/mod_spidermonkey_odbc/Makefile +++ b/src/mod/languages/mod_spidermonkey_odbc/Makefile @@ -7,11 +7,11 @@ depends: MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install unixODBC-2.2.12.tar.gz --prefix=$(PREFIX) --disable-gui --without-x --with-pic $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/languages/mod_spidermonkey_skel/Makefile b/src/mod/languages/mod_spidermonkey_skel/Makefile index 2d000943d7..0d1e7b844a 100644 --- a/src/mod/languages/mod_spidermonkey_skel/Makefile +++ b/src/mod/languages/mod_spidermonkey_skel/Makefile @@ -1,19 +1,15 @@ include ../mod_spidermonkey/sm.mak -OBJS=#$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -LINKER=$(CC) - - all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/languages/mod_spidermonkey_teletone/Makefile b/src/mod/languages/mod_spidermonkey_teletone/Makefile index 86bb0ae620..da921497ea 100644 --- a/src/mod/languages/mod_spidermonkey_teletone/Makefile +++ b/src/mod/languages/mod_spidermonkey_teletone/Makefile @@ -1,16 +1,16 @@ include ../mod_spidermonkey/sm.mak -LDFLAGS+=-lteletone +LDFLAGS+=$(BASE)/libs/libteletone/libteletone.la all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/xml_int/mod_xml_curl/Makefile b/src/mod/xml_int/mod_xml_curl/Makefile index ca5a06db55..060cf96ea8 100644 --- a/src/mod/xml_int/mod_xml_curl/Makefile +++ b/src/mod/xml_int/mod_xml_curl/Makefile @@ -1,18 +1,19 @@ -LDFLAGS += -lcurl +CFLAGS += -I$(BASE)/libs/curl/include +LDFLAGS += $(BASE)/libs/curl/lib/libcurl.la all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install curl --prefix=$(PREFIX) + cd $(BASE)/libs/curl && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod diff --git a/src/mod/xml_int/mod_xml_rpc/Makefile b/src/mod/xml_int/mod_xml_rpc/Makefile index 75146bab32..7de730efae 100644 --- a/src/mod/xml_int/mod_xml_rpc/Makefile +++ b/src/mod/xml_int/mod_xml_rpc/Makefile @@ -1,18 +1,23 @@ -LDFLAGS += -lxmlrpc -lxmlrpc_abyss -lxmlrpc_server -lxmlrpc_server_abyss -lxmlrpc_xmlparse +#LDFLAGS += -lxmlrpc -lxmlrpc_abyss -lxmlrpc_server -lxmlrpc_server_abyss -lxmlrpc_xmlparse +LDFLAGS += $(BASE)/libs/xmlrpc-c/src/libxmlrpc.la $(BASE)/libs/xmlrpc-c/src/libxmlrpc_server.la +LDFLAGS += $(BASE)/libs/xmlrpc-c/src/libxmlrpc_server_abyss.la $(BASE)/libs/xmlrpc-c/lib/abyss/src/libxmlrpc_abyss.la +LDFLAGS += $(BASE)/libs/xmlrpc-c/lib/expat/xmlparse/libxmlrpc_xmlparse.la + +CFLAGS += -I$(BASE)/libs/xmlrpc-c/include all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) depends: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install xmlrpc-c --prefix=$(PREFIX) --disable-cplusplus --disable-wininet-client --disable-libwww-client + cd $(BASE)/libs/xmlrpc-c && $(MAKE) $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c - $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o - $(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) + $(CC) $(CFLAGS) -c $(MODNAME).c -o $(MODNAME).o + $(LINK) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS) clean: - rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ + rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs install: - cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod + $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod