put mods in subdirs

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@269 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-01-03 22:36:56 +00:00
parent 6d6a7d672a
commit d934a136f0
15 changed files with 92 additions and 65 deletions

View File

@ -115,7 +115,8 @@ modules: $(NAME)
modclean: modclean:
@cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i clean || exit 1; done @cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i clean || exit 1; done
modwipe:
rm -f $(PREFIX)/mod/*.so
install_mod: modules install_mod: modules
@echo Installing $(NAME) @echo Installing $(NAME)
@ -123,7 +124,7 @@ install_mod: modules
@/bin/cp -p ./$(NAME) $(PREFIX)/bin @/bin/cp -p ./$(NAME) $(PREFIX)/bin
@ln -sf $(PREFIX)/bin/$(NAME) /usr/bin @ln -sf $(PREFIX)/bin/$(NAME) /usr/bin
@echo Installing Modules @echo Installing Modules
@/bin/cp -f src/mod/*/mod_*.so $(PREFIX)/mod >/dev/null 2<&1 || echo No modules to copy. @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making clean $$i ; PREFIX=$(PREFIX) MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i install || exit 1; done
@echo done @echo done
dox: dox:

View File

@ -978,13 +978,16 @@ modules: $(NAME)
modclean: modclean:
@cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i clean || exit 1; done @cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i clean || exit 1; done
modwipe:
rm -f $(PREFIX)/mod/*.so
install_mod: modules install_mod: modules
@echo Installing $(NAME) @echo Installing $(NAME)
@mkdir -p $(PREFIX) $(PREFIX)/conf $(PREFIX)/mod $(PREFIX)/db $(PREFIX)/bin @mkdir -p $(PREFIX) $(PREFIX)/conf $(PREFIX)/mod $(PREFIX)/db $(PREFIX)/bin
@/bin/cp -p ./$(NAME) $(PREFIX)/bin @/bin/cp -p ./$(NAME) $(PREFIX)/bin
@ln -sf $(PREFIX)/bin/$(NAME) /usr/bin @ln -sf $(PREFIX)/bin/$(NAME) /usr/bin
@echo Installing Modules @echo Installing Modules
@/bin/cp -f src/mod/*/mod_*.so $(PREFIX)/mod >/dev/null 2<&1 || echo No modules to copy. @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making clean $$i ; PREFIX=$(PREFIX) MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i install || exit 1; done
@echo done @echo done
dox: dox:

View File

@ -1,9 +1,11 @@
all: $(MOD).so all: $(MODNAME).so
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) $(MOD).o -o $(MOD).so $(LDFLAGS) $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).so $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -18,7 +18,6 @@ fi
if [ -f $mod/Makefile ] ; then if [ -f $mod/Makefile ] ; then
MODNAME=$end $make -C $mod $@ MODNAME=$end $make -C $mod $@
else else
echo "XX $make -f $pwd/generic_mod.mk -C $mod $@" MODNAME=$end $make -f $pwd/generic_mod.mk -C $mod $@
MODNAME=$end $make -f $pwd/generic_mod.mk -C $end $@
fi fi

View File

@ -1,20 +1,19 @@
# list the modules to build applications/mod_bridgecall
mod_bridgecall applications/mod_playback
mod_dialplan_demo #applications/mod_skel
mod_softtimer codecs/mod_codec_g729
mod_woomerachan codecs/mod_codec_gsm
mod_playback codecs/mod_g711codec
#mod_wanchan codecs/mod_rawaudio
mod_speexcodec codecs/mod_speexcodec
mod_exosip dialplans/mod_dialplan_demo
mod_g711codec endpoints/mod_exosip
mod_rawaudio endpoints/mod_iaxchan
mod_iaxchan #endpoints/mod_opalchan
#mod_opalchan endpoints/mod_portaudio
#mod_codec_g729 #endpoints/mod_wanchan
mod_event_test endpoints/mod_woomerachan
#mod_portaudio #event_handlers/mod_event_test
mod_xmpp_event event_handlers/mod_xmpp_event
mod_sndfile formats/mod_sndfile
codec/mod_codec_gsm timers/mod_softtimer

View File

@ -1,12 +1,14 @@
CFLAGS += -I/usr/local/include/libg729 CFLAGS += -I/usr/local/include/libg729
LDFLAGS +=-lg729 LDFLAGS +=-lg729
all: $(MOD).so all: $(MODNAME).so
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) $(MOD).o -o $(MOD).so $(LDFLAGS) -lspeex $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).so $(LDFLAGS) -lspeex
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -12,3 +12,5 @@ $(MODNAME).so: $(MODNAME).c
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -1,15 +1,18 @@
all: $(MOD).so all: $(MODNAME).so
g711.o: g711.c g711.h g711.o: g711.c g711.h
$(CC) -c -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE g711.c -o g711.o $(CC) -c -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE g711.c -o g711.o
$(MOD).so: $(MOD).c g711.o $(MODNAME).so: $(MODNAME).c g711.o
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) g711.o $(MOD).o -o $(MOD).so $(LDFLAGS) $(CC) $(SOLINK) g711.o $(MODNAME).o -o $(MODNAME).so $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -1,12 +1,14 @@
all: depends $(MOD).so all: depends $(MODNAME).so
depends: depends:
$(BASE)/buildlib.sh $(BASE) install speex-1.1.11.1.tar.gz --prefix=$(PREFIX) $(BASE)/buildlib.sh $(BASE) install speex-1.1.11.1.tar.gz --prefix=$(PREFIX)
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) $(MOD).o -o $(MOD).so $(LDFLAGS) -lspeex $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).so $(LDFLAGS) -lspeex
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -7,7 +7,7 @@ else
LINKER=$(CC) LINKER=$(CC)
endif endif
all: depends $(MOD).so all: depends $(MODNAME).so
depends: depends:
$(BASE)/buildlib.sh $(BASE) install jthread-1.1.2.tar.gz --prefix=$(PREFIX) $(BASE)/buildlib.sh $(BASE) install jthread-1.1.2.tar.gz --prefix=$(PREFIX)
@ -17,10 +17,12 @@ depends:
$(BASE)/buildlib.sh $(BASE) install libeXosip2-2.2.2.tar.gz --disable-josua --prefix=$(PREFIX) $(BASE)/buildlib.sh $(BASE) install libeXosip2-2.2.2.tar.gz --disable-josua --prefix=$(PREFIX)
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(LINKER) $(SOLINK) -o $(MOD).so $(MOD).o $(LDFLAGS) $(LINKER) $(SOLINK) -o $(MODNAME).so $(MODNAME).o $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -1,15 +1,17 @@
LDFLAGS += -liax -L/usr/local/lib LDFLAGS += -liax -L/usr/local/lib
all: depends $(MOD).so all: depends $(MODNAME).so
depends: depends:
$(BASE)/buildlib.sh $(BASE) install iax --enable-newjb --prefix=$(PREFIX) $(BASE)/buildlib.sh $(BASE) install iax --enable-newjb --prefix=$(PREFIX)
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) -o $(MOD).so $(MOD).o $(LDFLAGS) $(CC) $(SOLINK) -o $(MODNAME).so $(MODNAME).o $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -1,12 +1,14 @@
#CFLAGS += -I/usr/src/common/src #CFLAGS += -I/usr/src/common/src
LDFLAGS += -liax LDFLAGS += -liax
all: $(MOD).so all: $(MODNAME).so
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) -o $(MOD).so $(MOD).o $(LDFLAGS) $(CC) $(SOLINK) -o $(MODNAME).so $(MODNAME).o $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -1,19 +1,21 @@
LDFLAGS += -lportaudio -L/usr/local/lib LDFLAGS += -lportaudio -L/usr/local/lib
MYOBJS = pablio.o ringbuffer.o MYOBJS = pablio.o ringbuffer.o
all: depends $(MOD).so all: depends $(MODNAME).so
depends: depends:
$(BASE)/buildlib.sh $(BASE) install portaudio.tar.gz --prefix=$(PREFIX) $(BASE)/buildlib.sh $(BASE) install portaudio.tar.gz --prefix=$(PREFIX)
%.o: %.c %.o: %.c
$(CC) -fPIC $(CFLAGS) -c -o $@ $< $(CC) -fPIC $(CFLAGS) -c -o $@ $<
$(MOD).so: $(MOD).c $(MYOBJS) $(MODNAME).so: $(MODNAME).c $(MYOBJS)
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) -o $(MOD).so $(MOD).o $(MYOBJS) $(LDFLAGS) $(CC) $(SOLINK) -o $(MODNAME).so $(MODNAME).o $(MYOBJS) $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -1,14 +1,16 @@
LDFLAGS += -liksemel -L/usr/local/lib LDFLAGS += -liksemel -L/usr/local/lib
all: depends $(MOD).so all: depends $(MODNAME).so
depends: depends:
$(BASE)/buildlib.sh $(BASE) install iksemel-1.2.tar.gz --prefix=$(PREFIX) $(BASE)/buildlib.sh $(BASE) install iksemel-1.2.tar.gz --prefix=$(PREFIX)
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) -o $(MOD).so $(MOD).o $(LDFLAGS) $(CC) $(SOLINK) -o $(MODNAME).so $(MODNAME).o $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod

View File

@ -1,15 +1,19 @@
LDFLAGS += -lsndfile -L/usr/local/lib LDFLAGS += -lsndfile -L/usr/local/lib
all: depends $(MOD).so all: depends $(MODNAME).so
depends: depends:
$(BASE)/buildlib.sh $(BASE) install libsndfile-1.0.12.tar.gz --prefix=$(PREFIX) $(BASE)/buildlib.sh $(BASE) install libsndfile-1.0.12.tar.gz --prefix=$(PREFIX)
$(MOD).so: $(MOD).c $(MODNAME).so: $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
$(CC) $(SOLINK) -o $(MOD).so $(MOD).o $(LDFLAGS) $(CC) $(SOLINK) -o $(MODNAME).so $(MODNAME).o $(LDFLAGS)
clean: clean:
rm -fr *.so *.o *~ rm -fr *.so *.o *~
install:
cp -f $(MODNAME).so $(PREFIX)/mod