diff --git a/Makefile b/Makefile index 71819551df..cf65e0494a 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,9 @@ .EXPORT_ALL_VARIABLES: +#Uncomment this to see all build commands instead of 'quiet' output +#NOISY_BUILD=yes + # Create OPTIONS variable OPTIONS= @@ -366,6 +369,8 @@ else HAVEDOT=no endif +include Makefile.rules + _all: all @echo " +--------- Asterisk Build Complete ---------+" @echo " + Asterisk has successfully been built, but +" @@ -484,16 +489,17 @@ include/asterisk/buildopts.h: menuselect.makeopts channel.o: CFLAGS+=$(ZAPTEL_INCLUDE) asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS) - build_tools/make_build_h > include/asterisk/build.h.tmp - if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \ + @build_tools/make_build_h > include/asterisk/build.h.tmp + @if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \ mv include/asterisk/build.h.tmp include/asterisk/build.h ; \ fi - rm -f include/asterisk/build.h.tmp - $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c - $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS) + @rm -f include/asterisk/build.h.tmp + @$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c + @echo " [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(LIBS) -> $@" + @$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS) muted: muted.o - $(CC) $(AUDIO_LIBS) -o muted muted.o +muted: LDFLAGS+=$(AUDIO_LIBS) $(SUBDIRS_CLEAN_DEPEND): @$(MAKE) -C $(@:-clean-depend=) clean-depend diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules index a82fc99be2..e8a239fbe6 100644 --- a/Makefile.moddir_rules +++ b/Makefile.moddir_rules @@ -11,22 +11,35 @@ # the GNU General Public License # -define module_o_template +include $(ASTTOPDIR)/Makefile.rules + +define module_o_c_template $(1).o: $(1).c - $$(CC) -c -o $$@ $$< $$(CFLAGS) $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE)) +$(1).o: CFLAGS+=$$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE)) +endef + +define module_oo_cc_template +$(1).oo: $(1).cc +$(1).oo: CFLAGS+=$$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE)) endef -define module_so_template +define module_so_o_template $(1).so: $(1).o - $$(CC) $$(SOLINK) -o $$@ $$^ $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB)) +$(1).so: LDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB)) endef -%.o: %.c - $(CC) -c -o $@ $< $(CFLAGS) +define module_so_oo_template +$(1).so: $(1).oo +$(1).so: LDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB)) +endef + +$(foreach mod,$(filter-out $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_o_c_template,$(mod)))) + +$(foreach mod,$(filter-out $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_so_o_template,$(mod)))) -$(foreach mod,$(SELECTED_MODS),$(eval $(call module_o_template,$(mod)))) +$(foreach mod,$(filter $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_oo_cc_template,$(mod)))) -$(foreach mod,$(SELECTED_MODS),$(eval $(call module_so_template,$(mod)))) +$(foreach mod,$(filter $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_so_oo_template,$(mod)))) .PHONY: clean clean-depend depend uninstall _all @@ -36,7 +49,7 @@ clean-depend:: rm -f .depend clean:: clean-depend - rm -f *.so *.o + rm -f *.so *.o *.oo install:: all for x in $(SELECTED_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done diff --git a/agi/Makefile b/agi/Makefile index e7a2107429..907d5efe40 100644 --- a/agi/Makefile +++ b/agi/Makefile @@ -15,13 +15,18 @@ AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi -LIBS= ifeq ($(OSARCH),SunOS) - LIBS=-lsocket -lnsl ../strcompat.o + LDFLAGS+=-lsocket -lnsl ../strcompat.o endif +include $(ASTTOPDIR)/Makefile.rules + all: $(AGIS) +eagi-test: eagi-test.o + +eagi-sphinx-test: eagi-sphinx-test.o + install: all mkdir -p $(DESTDIR)$(AGI_DIR) for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done @@ -29,21 +34,12 @@ install: all uninstall: for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done -eagi-test: eagi-test.o - $(CC) $(CFLAGS) -include ../include/autoconfig.h -o eagi-test eagi-test.o $(LIBS) - -eagi-sphinx-test: eagi-sphinx-test.o - $(CC) $(CFLAGS) -include ../include/autoconfig.h -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS) - clean-depend: rm -f .depend clean: clean-depend rm -f *.so *.o look eagi-test eagi-sphinx-test -%.so : %.o - $(CC) -shared -Xlinker -x -o $@ $< - ifneq ($(wildcard .depend),) include .depend endif diff --git a/channels/Makefile b/channels/Makefile index d24b3ea130..37340f887f 100644 --- a/channels/Makefile +++ b/channels/Makefile @@ -14,7 +14,9 @@ ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makedeps endif -SELECTED_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c))) +SELECTED_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)) $(patsubst %.cc,%,$(wildcard chan_*.cc))) + +CC_MODS=chan_vpb ifeq ($(OSARCH),OpenBSD) PTLIB=-lpt_OpenBSD_x86_r @@ -44,8 +46,6 @@ endif ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/mISDNuser/mISDNlib.h),) SELECTED_MODS:=$(filter-out chan_misdn,$(SELECTED_MODS)) -else - CFLAGS+=-Imisdn endif ifndef OPENH323DIR @@ -56,25 +56,19 @@ ifndef PWLIBDIR PWLIBDIR=$(HOME)/pwlib endif -MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\" - all: _all include $(ASTTOPDIR)/Makefile.moddir_rules clean:: - rm -f busy.h ringtone.h gentone gentone-ulaw - -ifneq ($(wildcard $(ASTTOPDIR)/Makefile.ast),) - include $(ASTTOPDIR)/Makefile.ast -endif + rm -f busy.h ringtone.h gentone -ifneq ($(wildcard m$(ASTTOPDIR)/Makefile.ast),) - include m$(ASTTOPDIR)/Makefile.ast +ifneq ($(wildcard $(PWD)/Makefile.ast),) + include $(PWD)/Makefile.ast endif -gentone gentone-ulaw: %: %.c - $(HOST_CC) -o $@ $< -lm +$(eval $(call ast_make_final_host,gentone,gentone.c)) +gentone: LDFLAGS+=-lm busy.h: gentone ./gentone busy 480 620 @@ -82,20 +76,14 @@ busy.h: gentone ringtone.h: gentone ./gentone ringtone 440 480 -chan_oss.o: chan_oss.c busy.h ringtone.h +chan_oss.o: busy.h ringtone.h chan_iax2.so: iax2-parser.o iax2-provision.o chan_alsa.o: busy.h ringtone.h -chan_vpb.o: chan_vpb.c - $(CXX) -c $(CFLAGS:-Werror=) -o $@ chan_vpb.c - -chan_vpb.so: chan_vpb.o - $(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl - ifeq ($(OSARCH),Linux) -chan_h323.so: chan_h323.o h323/libchanh323.a $(ASTTOPDIR)/Makefile.ast +chan_h323.so: chan_h323.o h323/libchanh323.a $(PWD)/Makefile.ast $(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) -lstdc++ else chan_h323.so: chan_h323.o h323/libchanh323.a @@ -105,5 +93,9 @@ endif misdn/chan_misdn_lib.a: make -C misdn +chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" + +misdn_config.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" + chan_misdn.so: chan_misdn.o misdn_config.o misdn/chan_misdn_lib.a - $(CC) $(SOLINK) -o $@ $^ -lisdnnet -lmISDN +chan_misdn.so: LDFLAGS+=-lisdnnet -lmISDN diff --git a/channels/chan_vpb.c b/channels/chan_vpb.cc similarity index 100% rename from channels/chan_vpb.c rename to channels/chan_vpb.cc diff --git a/codecs/Makefile b/codecs/Makefile index 37aef43455..2e856a52b0 100644 --- a/codecs/Makefile +++ b/codecs/Makefile @@ -38,14 +38,15 @@ clean:: $(MAKE) -C ilbc clean gsm/lib/libgsm.a: - CFLAGS="$(ASTCFLAGS) -I." $(MAKE) -C gsm lib/libgsm.a + @mkdir -p gsm/lib + @CFLAGS="$(ASTCFLAGS) -I." $(MAKE) -C gsm lib/libgsm.a $(LIBLPC10): - CFLAGS="$(ASTCFLAGS)" $(MAKE) -C lpc10 all + @CFLAGS="$(ASTCFLAGS)" $(MAKE) -C lpc10 all codec_lpc10.so: $(LIBLPC10) $(LIBILBC): - CFLAGS="$(ASTCFLAGS)" $(MAKE) -C ilbc all + @CFLAGS="$(ASTCFLAGS)" $(MAKE) -C ilbc all codec_ilbc.so: $(LIBILBC) diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile index 7be253e848..49d2ad3722 100644 --- a/codecs/gsm/Makefile +++ b/codecs/gsm/Makefile @@ -71,12 +71,9 @@ PG = # CC = /usr/lang/acc # CCFLAGS = -c -O -CC ?= gcc CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops $(OPTIMIZE) CCFLAGS += -fPIC -LD = $(CC) - # LD = gcc # LDFLAGS = @@ -326,6 +323,8 @@ TOAST_INSTALL_TARGETS = \ $(CC) $(CFLAGS:-Werror=) $? @-mv `$(BASENAME) $@` $@ > /dev/null 2>&1 +include $(ASTTOPDIR)/Makefile.rules + # Target rules all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST) @@ -353,11 +352,7 @@ $(LIBGSMSO): $(LIB) $(GSM_OBJECTS) ln -fs libgsm.so.1.0.10 lib/libgsm.so.1 ln -fs libgsm.so.1.0.10 lib/libgsm.so -$(LIBGSM): $(LIB) $(GSM_OBJECTS) - -rm $(RMFLAGS) $(LIBGSM) - $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS) - $(RANLIB) $(LIBGSM) - +$(eval $(call ast_make_a_o,$(LIBGSM),$(GSM_OBJECTS))) # Toast, Untoast and Tcat -- the compress-like frontends to gsm. diff --git a/codecs/ilbc/Makefile b/codecs/ilbc/Makefile index c916ff3dde..1060579ab9 100644 --- a/codecs/ilbc/Makefile +++ b/codecs/ilbc/Makefile @@ -1,23 +1,17 @@ -ARCH=$(PROC) -CFLAGS+=-Wall -O3 -funroll-loops -CFLAGS += -fPIC LIB=libilbc.a +CFLAGS+=-fPIC -OBJS= anaFilter.o iCBSearch.o packing.o \ - constants.o gainquant.o iLBC_decode.o StateConstructW.o \ - createCB.o getCBvec.o iLBC_encode.o StateSearchW.o doCPLC.o \ - helpfun.o syntFilter.o enhancer.o hpInput.o LPCdecode.o \ - filter.o hpOutput.o LPCencode.o FrameClassify.o iCBConstruct.o lsf.o +OBJS=anaFilter.o iCBSearch.o packing.o \ + constants.o gainquant.o iLBC_decode.o StateConstructW.o \ + createCB.o getCBvec.o iLBC_encode.o StateSearchW.o doCPLC.o \ + helpfun.o syntFilter.o enhancer.o hpInput.o LPCdecode.o \ + filter.o hpOutput.o LPCencode.o FrameClassify.o iCBConstruct.o lsf.o -all: $(LIB) +include $(ASTTOPDIR)/Makefile.rules +all: $(LIB) -$(LIB): $(OBJS) - ar cr $(LIB) $(OBJS) - ranlib $(LIB) +$(eval $(call ast_make_a_o,$(LIB),$(OBJS))) clean: rm -f $(LIB) *.o - -install: - diff --git a/codecs/lpc10/Makefile b/codecs/lpc10/Makefile index e52ca19b66..75b3f858fd 100644 --- a/codecs/lpc10/Makefile +++ b/codecs/lpc10/Makefile @@ -21,10 +21,7 @@ LIB_TARGET_DIR = . # directives can find the machine.h file. # -WARNINGS = -Wall -Wno-comment -Wno-error -CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -CFLAGS += -fPIC -#CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi) +CFLAGS+= -fPIC -Wno-comment #fix for PPC processors and ALPHA, And UltraSparc too ifneq ($(OSARCH),Darwin) @@ -56,18 +53,18 @@ LIB = $(LIB_TARGET_DIR)/liblpc10.a .PHONY: all clean +include $(ASTTOPDIR)/Makefile.rules + all: $(LIB) -OBJ= f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \ - deemp.o difmag.o dyptrk.o encode.o energy.o ham84.o \ - hp100.o invert.o irc2pc.o ivfilt.o lpcdec.o lpcenc.o \ - lpcini.o lpfilt.o median.o mload.o onset.o pitsyn.o \ - placea.o placev.o preemp.o prepro.o random.o rcchk.o \ - synths.o tbdm.o voicin.o vparms.o +OBJ=f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \ + deemp.o difmag.o dyptrk.o encode.o energy.o ham84.o \ + hp100.o invert.o irc2pc.o ivfilt.o lpcdec.o lpcenc.o \ + lpcini.o lpfilt.o median.o mload.o onset.o pitsyn.o \ + placea.o placev.o preemp.o prepro.o random.o rcchk.o \ + synths.o tbdm.o voicin.o vparms.o -$(LIB): $(OBJ) - $(AR) cr $@ $(OBJ) - ranlib $@ +$(eval $(call ast_make_a_o,$(LIB),$(OBJ))) clean: - -rm -f *.o $(LIB) + rm -f *.o $(LIB) diff --git a/db1-ast/Makefile b/db1-ast/Makefile index 4f506fc690..a2d50c83cf 100644 --- a/db1-ast/Makefile +++ b/db1-ast/Makefile @@ -19,25 +19,24 @@ endif LIBDBSO=libdb.so.$(SOVER) PROG= db_dump185 -OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \ - ndbm.o -OBJ2= bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \ - bt_overflow.o bt_page.o bt_put.o bt_search.o bt_seq.o bt_split.o \ - bt_utils.o -OBJ3= db.o -OBJ4= mpool.o -OBJ5= rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o rec_search.o \ - rec_seq.o rec_utils.o +OBJ1= hash/hash.o hash/hash_bigkey.o hash/hash_buf.o hash/hash_func.o hash/hash_log2.o hash/hash_page.o \ + hash/ndbm.o +OBJ2= btree/bt_close.o btree/bt_conv.o btree/bt_debug.o btree/bt_delete.o btree/bt_get.o btree/bt_open.o \ + btree/bt_overflow.o btree/bt_page.o btree/bt_put.o btree/bt_search.o btree/bt_seq.o btree/bt_split.o \ + btree/bt_utils.o +OBJ3= db/db.o +OBJ4= mpool/mpool.o +OBJ5= recno/rec_close.o recno/rec_delete.o recno/rec_get.o recno/rec_open.o recno/rec_put.o recno/rec_search.o \ + recno/rec_seq.o recno/rec_utils.o MISC= OBJS= $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(MISC) SHOBJS= $(patsubst %.o,%.os,$(OBJS)) +include $(ASTTOPDIR)/Makefile.rules + all: $(LIBDB) #$(LIBDBSO) $(PROG) -$(LIBDB): $(OBJS) - rm -f $@ - ar cq $@ $(OBJS) - ranlib $@ +$(eval $(call ast_make_a_o,$(LIBDB),$(OBJS))) $(LIBDBSO): $(SHOBJS) $(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^ @@ -51,32 +50,24 @@ clean-depend: clean: rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS) -CL= $(CC) $(CFLAGS) -Wall -c -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude +CFLAGS+=-Wall -c -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno OSTYPE=$(shell uname -s) ifeq ($(OSTYPE),SunOS) -CL+=-I../include -I../include/solaris-compat -DSOLARIS +CFLAGS+=-I../include -I../include/solaris-compat -DSOLARIS endif db_dump185.o: db_dump185.c $(CL) -o $@ $< -%.o: hash/%.c +x%.o: hash/%.c $(CL) -Ihash $(OSARCH_DEFINE) -o $@ $< %.os: hash/%.c $(CL) -Ihash -fPIC -o $@ $< -%.o: btree/%.c +x%.o: btree/%.c $(CL) -Ibtree -o $@ $< %.os: btree/%.c $(CL) -Ibtree -fPIC -o $@ $< -db.o: db/db.c - $(CL) -o $@ $< -db.os: db/db.c - $(CL) -fPIC -o $@ $< -mpool.o: mpool/mpool.c - $(CL) -o $@ $< -mpool.os: mpool/mpool.c - $(CL) -fPIC -o $@ $< -%.o: recno/%.c +x%.o: recno/%.c $(CL) -Irecno -o $@ $< %.os: recno/%.c $(CL) -Irecno -fPIC -o $@ $< diff --git a/pbx/Makefile b/pbx/Makefile index 43aa519b7a..19fb905c40 100644 --- a/pbx/Makefile +++ b/pbx/Makefile @@ -25,11 +25,11 @@ include $(ASTTOPDIR)/Makefile.moddir_rules clean:: rm -f ael/*.o -ael/aelflex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h - $(CC) $(CFLAGS) -I. -c -o $@ $< +$(eval $(call ast_make_o_c,ael/aelflex.o,ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h)) +ael/aelflex.o: CFLAGS+=-I. -ael/aelbison.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h - $(CC) $(CFLAGS) -I. -c -o $@ $< +$(eval $(call ast_make_o_c,ael/aelbison.o,ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h)) +ael/aelbison.o: CFLAGS+=-I. pbx_ael.so: pbx_ael.o ael/aelbison.o ael/aelflex.o @@ -39,7 +39,7 @@ ael/ael_lex.c: ael/ael.tab.c ael/ael.tab.h: (cd ael; bison -v -d ael.y) -dundi-parser.o: dundi-parser.c dundi-parser.h - $(CC) $(CFLAGS) -I. -c -o $@ $< +$(eval $(call ast_make_o_c,dundi-parser.o,dundi-parser.c dundi-parser.h)) +dundi-parser.o: CFLAGS+=-I. pbx_dundi.so: pbx_dundi.o dundi-parser.o diff --git a/utils/Makefile b/utils/Makefile index 4e3aa5e83e..f6f24710d1 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -16,8 +16,7 @@ UTILS:=astman smsq stereorize streamplayer aelparse ifeq (${OSARCH},SunOS) - SOL=../strcompat.o - SOLLIBS=-lsocket -lnsl + LDFLAGS+=../strcompat.o -lsocket -lnsl endif ifeq ($(POPT_LIB),) @@ -32,6 +31,8 @@ ifneq ($(filter pbx_ael,$(MENUSELECT_PBX)),) UTILS:=$(filter-out aelparse,$(UTILS)) endif +include $(ASTTOPDIR)/Makefile.rules + all: $(UTILS) install: @@ -49,49 +50,39 @@ clean-depend: clean: clean-depend rm -f *.o $(UTILS) check_expr - rm -f ast_expr2.o ast_expr2f.o - -astman.o: astman.c - $(CC) $(CFLAGS) -c -o $@ $< astman: astman.o ../md5.o - $(CC) $(CFLAGS) -o $@ $< ../md5.o -lnewt +astman: LDFLAGS+=-lnewt stereorize: stereorize.o frame.o - $(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm +stereorize: LDFLAGS+=-lm ../ast_expr2.c: - bison -o $@ -d --name-prefix=ast_yy ../ast_expr2.y + @echo " [BISON] ../ast_expr2.y -> $@" + @bison -o $@ -d --name-prefix=ast_yy ../ast_expr2.y ../ast_expr2f.c: - flex -o $@ --full ../ast_expr2.fl + @echo " [FLEX] ../ast_expr2.fl -> $@" + @flex -o $@ --full ../ast_expr2.fl -ast_expr2.o: ../ast_expr2.c - gcc $(CFLAGS) -c -o $@ $< +$(eval $(call ast_make_o_c,ast_expr2.o,../ast_expr2.c)) -ast_expr2f.o: ../ast_expr2f.c - gcc $(CFLAGS) -c -DSTANDALONE -o $@ $< +$(eval $(call ast_make_o_c,ast_expr2f.o,../ast_expr2f.c)) +ast_expr2f.o: CFLAGS+=-DSTANDALONE -check_expr: check_expr.c ast_expr2.o ast_expr2f.o - $(CC) $(CFLAGS) -o $@ $^ +$(eval $(call ast_make_final,check_expr,check_expr.c ast_expr2.o ast_expr2f.o)) -aelflex.o: ../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h - $(CC) $(CFLAGS) -I../pbx -DSTANDALONE -c -o $@ $< +$(eval $(call ast_make_o_c,aelflex.o,../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h)) +aelflex.o: CFLAGS+=-I../pbx -DSTANDALONE -aelbison.o: ../pbx/ael/ael.tab.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h - $(CC) $(CFLAGS) -I../pbx -c -o $@ $< +$(eval $(call ast_make_o_c,aelbison.o,../pbx/ael/ael.tab.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h)) +aelbison.o: CFLAGS+=-I../pbx -pbx_ael.o: ../pbx/pbx_ael.c - $(CC) $(CFLAGS) -c -o $@ $< +$(eval $(call ast_make_o_c,pbx_ael.o,../pbx/pbx_ael.c)) -aelparse : aelflex.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o - $(CC) $(CFLAGS) -g -o aelparse aelflex.o aelbison.o ael_main.o pbx_ael.o ast_expr2f.o ast_expr2.o +$(eval $(call ast_make_final,aelparse,aelflex.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o)) -ael_main.o : ael_main.c ../include/asterisk/ael_structs.h - $(CC) $(CFLAGS) -c -g -o ael_main.o ael_main.c - -ael_main1.o : ael_main.c ../include/asterisk/ael_structs.h - $(CC) $(CFLAGS) -c -g -o ael_main1.o ael_main.c +$(eval $(call ast_make_o_c,ael_main.o,ael_main.c ../include/asterisk/ael_structs.h)) testexpr2s: ../ast_expr2f.c ../ast_expr2.c ../ast_expr2.h $(CC) -g -c -I../include -DSTANDALONE ../ast_expr2f.c -o ast_expr2f.o @@ -100,14 +91,10 @@ testexpr2s: ../ast_expr2f.c ../ast_expr2.c ../ast_expr2.h rm ast_expr2.o ast_expr2f.o ./testexpr2s expr2.testinput -smsq.o: smsq.c - $(CC) $(CFLAGS) -c -o $@ $< - smsq: smsq.o - $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt +smsq: LDFLAGS+=-lpopt streamplayer: streamplayer.o - $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS} ifneq ($(wildcard .depend),) include .depend