make the build output less noisy (optional, can be controlled by the NOISY_BUILD variable in the top-level Makefile)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-07-06 23:18:45 +00:00
parent 04ed725e73
commit 4f826452cf
12 changed files with 127 additions and 155 deletions

View File

@@ -13,6 +13,9 @@
.EXPORT_ALL_VARIABLES: .EXPORT_ALL_VARIABLES:
#Uncomment this to see all build commands instead of 'quiet' output
#NOISY_BUILD=yes
# Create OPTIONS variable # Create OPTIONS variable
OPTIONS= OPTIONS=
@@ -366,6 +369,8 @@ else
HAVEDOT=no HAVEDOT=no
endif endif
include Makefile.rules
_all: all _all: all
@echo " +--------- Asterisk Build Complete ---------+" @echo " +--------- Asterisk Build Complete ---------+"
@echo " + Asterisk has successfully been built, but +" @echo " + Asterisk has successfully been built, but +"
@@ -484,16 +489,17 @@ include/asterisk/buildopts.h: menuselect.makeopts
channel.o: CFLAGS+=$(ZAPTEL_INCLUDE) channel.o: CFLAGS+=$(ZAPTEL_INCLUDE)
asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS) asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
build_tools/make_build_h > include/asterisk/build.h.tmp @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 \ @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 ; \ mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
fi fi
rm -f include/asterisk/build.h.tmp @rm -f include/asterisk/build.h.tmp
$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c @$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS) @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 muted: muted.o
$(CC) $(AUDIO_LIBS) -o muted muted.o muted: LDFLAGS+=$(AUDIO_LIBS)
$(SUBDIRS_CLEAN_DEPEND): $(SUBDIRS_CLEAN_DEPEND):
@$(MAKE) -C $(@:-clean-depend=) clean-depend @$(MAKE) -C $(@:-clean-depend=) clean-depend

View File

@@ -11,22 +11,35 @@
# the GNU General Public License # the GNU General Public License
# #
define module_o_template include $(ASTTOPDIR)/Makefile.rules
define module_o_c_template
$(1).o: $(1).c $(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 endef
define module_so_template 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_o_template
$(1).so: $(1).o $(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 endef
%.o: %.c define module_so_oo_template
$(CC) -c -o $@ $< $(CFLAGS) $(1).so: $(1).oo
$(1).so: LDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB))
endef
$(foreach mod,$(SELECTED_MODS),$(eval $(call module_o_template,$(mod)))) $(foreach mod,$(filter-out $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_o_c_template,$(mod))))
$(foreach mod,$(SELECTED_MODS),$(eval $(call module_so_template,$(mod)))) $(foreach mod,$(filter-out $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_so_o_template,$(mod))))
$(foreach mod,$(filter $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_oo_cc_template,$(mod))))
$(foreach mod,$(filter $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_so_oo_template,$(mod))))
.PHONY: clean clean-depend depend uninstall _all .PHONY: clean clean-depend depend uninstall _all
@@ -36,7 +49,7 @@ clean-depend::
rm -f .depend rm -f .depend
clean:: clean-depend clean:: clean-depend
rm -f *.so *.o rm -f *.so *.o *.oo
install:: all install:: all
for x in $(SELECTED_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done for x in $(SELECTED_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done

View File

@@ -15,13 +15,18 @@
AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
LIBS=
ifeq ($(OSARCH),SunOS) ifeq ($(OSARCH),SunOS)
LIBS=-lsocket -lnsl ../strcompat.o LDFLAGS+=-lsocket -lnsl ../strcompat.o
endif endif
include $(ASTTOPDIR)/Makefile.rules
all: $(AGIS) all: $(AGIS)
eagi-test: eagi-test.o
eagi-sphinx-test: eagi-sphinx-test.o
install: all install: all
mkdir -p $(DESTDIR)$(AGI_DIR) mkdir -p $(DESTDIR)$(AGI_DIR)
for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
@@ -29,21 +34,12 @@ install: all
uninstall: uninstall:
for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done 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: clean-depend:
rm -f .depend rm -f .depend
clean: clean-depend clean: clean-depend
rm -f *.so *.o look eagi-test eagi-sphinx-test rm -f *.so *.o look eagi-test eagi-sphinx-test
%.so : %.o
$(CC) -shared -Xlinker -x -o $@ $<
ifneq ($(wildcard .depend),) ifneq ($(wildcard .depend),)
include .depend include .depend
endif endif

View File

@@ -14,7 +14,9 @@ ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makedeps include ../menuselect.makedeps
endif 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) ifeq ($(OSARCH),OpenBSD)
PTLIB=-lpt_OpenBSD_x86_r PTLIB=-lpt_OpenBSD_x86_r
@@ -44,8 +46,6 @@ endif
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/mISDNuser/mISDNlib.h),) ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/mISDNuser/mISDNlib.h),)
SELECTED_MODS:=$(filter-out chan_misdn,$(SELECTED_MODS)) SELECTED_MODS:=$(filter-out chan_misdn,$(SELECTED_MODS))
else
CFLAGS+=-Imisdn
endif endif
ifndef OPENH323DIR ifndef OPENH323DIR
@@ -56,25 +56,19 @@ ifndef PWLIBDIR
PWLIBDIR=$(HOME)/pwlib PWLIBDIR=$(HOME)/pwlib
endif endif
MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\"
all: _all all: _all
include $(ASTTOPDIR)/Makefile.moddir_rules include $(ASTTOPDIR)/Makefile.moddir_rules
clean:: clean::
rm -f busy.h ringtone.h gentone gentone-ulaw rm -f busy.h ringtone.h gentone
ifneq ($(wildcard $(ASTTOPDIR)/Makefile.ast),) ifneq ($(wildcard $(PWD)/Makefile.ast),)
include $(ASTTOPDIR)/Makefile.ast include $(PWD)/Makefile.ast
endif endif
ifneq ($(wildcard m$(ASTTOPDIR)/Makefile.ast),) $(eval $(call ast_make_final_host,gentone,gentone.c))
include m$(ASTTOPDIR)/Makefile.ast gentone: LDFLAGS+=-lm
endif
gentone gentone-ulaw: %: %.c
$(HOST_CC) -o $@ $< -lm
busy.h: gentone busy.h: gentone
./gentone busy 480 620 ./gentone busy 480 620
@@ -82,20 +76,14 @@ busy.h: gentone
ringtone.h: gentone ringtone.h: gentone
./gentone ringtone 440 480 ./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_iax2.so: iax2-parser.o iax2-provision.o
chan_alsa.o: busy.h ringtone.h 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) 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++ $(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) -lstdc++
else else
chan_h323.so: chan_h323.o h323/libchanh323.a chan_h323.so: chan_h323.o h323/libchanh323.a
@@ -105,5 +93,9 @@ endif
misdn/chan_misdn_lib.a: misdn/chan_misdn_lib.a:
make -C misdn 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 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

View File

@@ -38,14 +38,15 @@ clean::
$(MAKE) -C ilbc clean $(MAKE) -C ilbc clean
gsm/lib/libgsm.a: 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): $(LIBLPC10):
CFLAGS="$(ASTCFLAGS)" $(MAKE) -C lpc10 all @CFLAGS="$(ASTCFLAGS)" $(MAKE) -C lpc10 all
codec_lpc10.so: $(LIBLPC10) codec_lpc10.so: $(LIBLPC10)
$(LIBILBC): $(LIBILBC):
CFLAGS="$(ASTCFLAGS)" $(MAKE) -C ilbc all @CFLAGS="$(ASTCFLAGS)" $(MAKE) -C ilbc all
codec_ilbc.so: $(LIBILBC) codec_ilbc.so: $(LIBILBC)

View File

@@ -71,12 +71,9 @@ PG =
# CC = /usr/lang/acc # CC = /usr/lang/acc
# CCFLAGS = -c -O # CCFLAGS = -c -O
CC ?= gcc
CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops $(OPTIMIZE) CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops $(OPTIMIZE)
CCFLAGS += -fPIC CCFLAGS += -fPIC
LD = $(CC)
# LD = gcc # LD = gcc
# LDFLAGS = # LDFLAGS =
@@ -326,6 +323,8 @@ TOAST_INSTALL_TARGETS = \
$(CC) $(CFLAGS:-Werror=) $? $(CC) $(CFLAGS:-Werror=) $?
@-mv `$(BASENAME) $@` $@ > /dev/null 2>&1 @-mv `$(BASENAME) $@` $@ > /dev/null 2>&1
include $(ASTTOPDIR)/Makefile.rules
# Target rules # Target rules
all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST) 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.1
ln -fs libgsm.so.1.0.10 lib/libgsm.so ln -fs libgsm.so.1.0.10 lib/libgsm.so
$(LIBGSM): $(LIB) $(GSM_OBJECTS) $(eval $(call ast_make_a_o,$(LIBGSM),$(GSM_OBJECTS)))
-rm $(RMFLAGS) $(LIBGSM)
$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
$(RANLIB) $(LIBGSM)
# Toast, Untoast and Tcat -- the compress-like frontends to gsm. # Toast, Untoast and Tcat -- the compress-like frontends to gsm.

View File

@@ -1,7 +1,5 @@
ARCH=$(PROC)
CFLAGS+=-Wall -O3 -funroll-loops
CFLAGS += -fPIC
LIB=libilbc.a LIB=libilbc.a
CFLAGS+=-fPIC
OBJS=anaFilter.o iCBSearch.o packing.o \ OBJS=anaFilter.o iCBSearch.o packing.o \
constants.o gainquant.o iLBC_decode.o StateConstructW.o \ constants.o gainquant.o iLBC_decode.o StateConstructW.o \
@@ -9,15 +7,11 @@ OBJS= anaFilter.o iCBSearch.o packing.o \
helpfun.o syntFilter.o enhancer.o hpInput.o LPCdecode.o \ helpfun.o syntFilter.o enhancer.o hpInput.o LPCdecode.o \
filter.o hpOutput.o LPCencode.o FrameClassify.o iCBConstruct.o lsf.o filter.o hpOutput.o LPCencode.o FrameClassify.o iCBConstruct.o lsf.o
include $(ASTTOPDIR)/Makefile.rules
all: $(LIB) all: $(LIB)
$(eval $(call ast_make_a_o,$(LIB),$(OBJS)))
$(LIB): $(OBJS)
ar cr $(LIB) $(OBJS)
ranlib $(LIB)
clean: clean:
rm -f $(LIB) *.o rm -f $(LIB) *.o
install:

View File

@@ -21,10 +21,7 @@ LIB_TARGET_DIR = .
# directives can find the machine.h file. # directives can find the machine.h file.
# #
WARNINGS = -Wall -Wno-comment -Wno-error CFLAGS+= -fPIC -Wno-comment
CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS)
CFLAGS += -fPIC
#CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi)
#fix for PPC processors and ALPHA, And UltraSparc too #fix for PPC processors and ALPHA, And UltraSparc too
ifneq ($(OSARCH),Darwin) ifneq ($(OSARCH),Darwin)
@@ -56,6 +53,8 @@ LIB = $(LIB_TARGET_DIR)/liblpc10.a
.PHONY: all clean .PHONY: all clean
include $(ASTTOPDIR)/Makefile.rules
all: $(LIB) all: $(LIB)
OBJ=f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \ OBJ=f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \
@@ -65,9 +64,7 @@ OBJ= f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \
placea.o placev.o preemp.o prepro.o random.o rcchk.o \ placea.o placev.o preemp.o prepro.o random.o rcchk.o \
synths.o tbdm.o voicin.o vparms.o synths.o tbdm.o voicin.o vparms.o
$(LIB): $(OBJ) $(eval $(call ast_make_a_o,$(LIB),$(OBJ)))
$(AR) cr $@ $(OBJ)
ranlib $@
clean: clean:
-rm -f *.o $(LIB) rm -f *.o $(LIB)

View File

@@ -19,25 +19,24 @@ endif
LIBDBSO=libdb.so.$(SOVER) LIBDBSO=libdb.so.$(SOVER)
PROG= db_dump185 PROG= db_dump185
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.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 \
ndbm.o hash/ndbm.o
OBJ2= bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.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 \
bt_overflow.o bt_page.o bt_put.o bt_search.o bt_seq.o bt_split.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 \
bt_utils.o btree/bt_utils.o
OBJ3= db.o OBJ3= db/db.o
OBJ4= mpool.o OBJ4= mpool/mpool.o
OBJ5= rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o rec_search.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 \
rec_seq.o rec_utils.o recno/rec_seq.o recno/rec_utils.o
MISC= MISC=
OBJS= $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(MISC) OBJS= $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(MISC)
SHOBJS= $(patsubst %.o,%.os,$(OBJS)) SHOBJS= $(patsubst %.o,%.os,$(OBJS))
include $(ASTTOPDIR)/Makefile.rules
all: $(LIBDB) #$(LIBDBSO) $(PROG) all: $(LIBDB) #$(LIBDBSO) $(PROG)
$(LIBDB): $(OBJS) $(eval $(call ast_make_a_o,$(LIBDB),$(OBJS)))
rm -f $@
ar cq $@ $(OBJS)
ranlib $@
$(LIBDBSO): $(SHOBJS) $(LIBDBSO): $(SHOBJS)
$(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^ $(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^
@@ -51,32 +50,24 @@ clean-depend:
clean: clean:
rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS) 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) OSTYPE=$(shell uname -s)
ifeq ($(OSTYPE),SunOS) ifeq ($(OSTYPE),SunOS)
CL+=-I../include -I../include/solaris-compat -DSOLARIS CFLAGS+=-I../include -I../include/solaris-compat -DSOLARIS
endif endif
db_dump185.o: db_dump185.c db_dump185.o: db_dump185.c
$(CL) -o $@ $< $(CL) -o $@ $<
%.o: hash/%.c x%.o: hash/%.c
$(CL) -Ihash $(OSARCH_DEFINE) -o $@ $< $(CL) -Ihash $(OSARCH_DEFINE) -o $@ $<
%.os: hash/%.c %.os: hash/%.c
$(CL) -Ihash -fPIC -o $@ $< $(CL) -Ihash -fPIC -o $@ $<
%.o: btree/%.c x%.o: btree/%.c
$(CL) -Ibtree -o $@ $< $(CL) -Ibtree -o $@ $<
%.os: btree/%.c %.os: btree/%.c
$(CL) -Ibtree -fPIC -o $@ $< $(CL) -Ibtree -fPIC -o $@ $<
db.o: db/db.c x%.o: recno/%.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
$(CL) -Irecno -o $@ $< $(CL) -Irecno -o $@ $<
%.os: recno/%.c %.os: recno/%.c
$(CL) -Irecno -fPIC -o $@ $< $(CL) -Irecno -fPIC -o $@ $<

View File

@@ -25,11 +25,11 @@ include $(ASTTOPDIR)/Makefile.moddir_rules
clean:: clean::
rm -f ael/*.o rm -f ael/*.o
ael/aelflex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h $(eval $(call ast_make_o_c,ael/aelflex.o,ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h))
$(CC) $(CFLAGS) -I. -c -o $@ $< ael/aelflex.o: CFLAGS+=-I.
ael/aelbison.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h $(eval $(call ast_make_o_c,ael/aelbison.o,ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h))
$(CC) $(CFLAGS) -I. -c -o $@ $< ael/aelbison.o: CFLAGS+=-I.
pbx_ael.so: pbx_ael.o ael/aelbison.o ael/aelflex.o 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: ael/ael.tab.c ael/ael.tab.h:
(cd ael; bison -v -d ael.y) (cd ael; bison -v -d ael.y)
dundi-parser.o: dundi-parser.c dundi-parser.h $(eval $(call ast_make_o_c,dundi-parser.o,dundi-parser.c dundi-parser.h))
$(CC) $(CFLAGS) -I. -c -o $@ $< dundi-parser.o: CFLAGS+=-I.
pbx_dundi.so: pbx_dundi.o dundi-parser.o pbx_dundi.so: pbx_dundi.o dundi-parser.o

View File

@@ -16,8 +16,7 @@
UTILS:=astman smsq stereorize streamplayer aelparse UTILS:=astman smsq stereorize streamplayer aelparse
ifeq (${OSARCH},SunOS) ifeq (${OSARCH},SunOS)
SOL=../strcompat.o LDFLAGS+=../strcompat.o -lsocket -lnsl
SOLLIBS=-lsocket -lnsl
endif endif
ifeq ($(POPT_LIB),) ifeq ($(POPT_LIB),)
@@ -32,6 +31,8 @@ ifneq ($(filter pbx_ael,$(MENUSELECT_PBX)),)
UTILS:=$(filter-out aelparse,$(UTILS)) UTILS:=$(filter-out aelparse,$(UTILS))
endif endif
include $(ASTTOPDIR)/Makefile.rules
all: $(UTILS) all: $(UTILS)
install: install:
@@ -49,49 +50,39 @@ clean-depend:
clean: clean-depend clean: clean-depend
rm -f *.o $(UTILS) check_expr 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 astman: astman.o ../md5.o
$(CC) $(CFLAGS) -o $@ $< ../md5.o -lnewt astman: LDFLAGS+=-lnewt
stereorize: stereorize.o frame.o stereorize: stereorize.o frame.o
$(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm stereorize: LDFLAGS+=-lm
../ast_expr2.c: ../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: ../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 $(eval $(call ast_make_o_c,ast_expr2.o,../ast_expr2.c))
gcc $(CFLAGS) -c -o $@ $<
ast_expr2f.o: ../ast_expr2f.c $(eval $(call ast_make_o_c,ast_expr2f.o,../ast_expr2f.c))
gcc $(CFLAGS) -c -DSTANDALONE -o $@ $< ast_expr2f.o: CFLAGS+=-DSTANDALONE
check_expr: check_expr.c ast_expr2.o ast_expr2f.o $(eval $(call ast_make_final,check_expr,check_expr.c ast_expr2.o ast_expr2f.o))
$(CC) $(CFLAGS) -o $@ $^
aelflex.o: ../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h $(eval $(call ast_make_o_c,aelflex.o,../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h))
$(CC) $(CFLAGS) -I../pbx -DSTANDALONE -c -o $@ $< aelflex.o: CFLAGS+=-I../pbx -DSTANDALONE
aelbison.o: ../pbx/ael/ael.tab.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h $(eval $(call ast_make_o_c,aelbison.o,../pbx/ael/ael.tab.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h))
$(CC) $(CFLAGS) -I../pbx -c -o $@ $< aelbison.o: CFLAGS+=-I../pbx
pbx_ael.o: ../pbx/pbx_ael.c $(eval $(call ast_make_o_c,pbx_ael.o,../pbx/pbx_ael.c))
$(CC) $(CFLAGS) -c -o $@ $<
aelparse : aelflex.o aelbison.o pbx_ael.o ael_main.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))
$(CC) $(CFLAGS) -g -o aelparse aelflex.o aelbison.o ael_main.o pbx_ael.o ast_expr2f.o ast_expr2.o
ael_main.o : ael_main.c ../include/asterisk/ael_structs.h $(eval $(call ast_make_o_c,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
testexpr2s: ../ast_expr2f.c ../ast_expr2.c ../ast_expr2.h testexpr2s: ../ast_expr2f.c ../ast_expr2.c ../ast_expr2.h
$(CC) -g -c -I../include -DSTANDALONE ../ast_expr2f.c -o ast_expr2f.o $(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 rm ast_expr2.o ast_expr2f.o
./testexpr2s expr2.testinput ./testexpr2s expr2.testinput
smsq.o: smsq.c
$(CC) $(CFLAGS) -c -o $@ $<
smsq: smsq.o smsq: smsq.o
$(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt smsq: LDFLAGS+=-lpopt
streamplayer: streamplayer.o streamplayer: streamplayer.o
$(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS}
ifneq ($(wildcard .depend),) ifneq ($(wildcard .depend),)
include .depend include .depend