2005-06-20 17:26:08 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
|
|
|
# Various utilities
|
|
|
|
#
|
2006-04-24 17:11:45 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium
|
2005-06-20 17:26:08 +00:00
|
|
|
#
|
|
|
|
# Mark Spencer <markster@digium.com>
|
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2007-03-22 14:48:09 +00:00
|
|
|
-include ../menuselect.makeopts
|
|
|
|
|
2006-12-16 21:24:52 +00:00
|
|
|
.PHONY: clean all uninstall
|
2006-06-22 11:27:03 +00:00
|
|
|
|
2007-01-24 18:39:49 +00:00
|
|
|
# to get check_expr, add it to the ALL_UTILS list
|
2007-09-10 16:59:18 +00:00
|
|
|
ALL_UTILS:=astman smsq stereorize streamplayer aelparse muted check_expr conf2ael hashtest2
|
2006-09-29 22:48:43 +00:00
|
|
|
UTILS:=$(ALL_UTILS)
|
|
|
|
|
|
|
|
include $(ASTTOPDIR)/Makefile.rules
|
2004-06-04 15:44:14 +00:00
|
|
|
|
2006-09-19 14:16:12 +00:00
|
|
|
ifeq ($(OSARCH),SunOS)
|
2006-09-15 17:16:00 +00:00
|
|
|
LIBS+=-lsocket -lnsl
|
2006-09-18 22:35:40 +00:00
|
|
|
UTILS:=$(filter-out muted,$(UTILS))
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
|
2006-10-28 16:39:40 +00:00
|
|
|
ifeq ($(OSARCH),OpenBSD)
|
|
|
|
UTILS:=$(filter-out muted,$(UTILS))
|
|
|
|
endif
|
|
|
|
|
2007-11-05 21:36:11 +00:00
|
|
|
ifneq ($(findstring darwin,$(OSARCH)),)
|
|
|
|
AUDIO_LIBS=-framework CoreAudio
|
|
|
|
endif
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(POPT_LIB),)
|
|
|
|
UTILS:=$(filter-out smsq,$(UTILS))
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(NEWT_LIB),)
|
|
|
|
UTILS:=$(filter-out astman,$(UTILS))
|
2005-03-17 23:12:15 +00:00
|
|
|
endif
|
2004-12-11 22:36:27 +00:00
|
|
|
|
2006-06-05 20:46:27 +00:00
|
|
|
ifneq ($(filter pbx_ael,$(MENUSELECT_PBX)),)
|
2006-05-08 16:47:49 +00:00
|
|
|
UTILS:=$(filter-out aelparse,$(UTILS))
|
2007-08-15 19:21:27 +00:00
|
|
|
UTILS:=$(filter-out conf2ael,$(UTILS))
|
2006-05-08 16:47:49 +00:00
|
|
|
endif
|
|
|
|
|
2006-06-22 14:09:18 +00:00
|
|
|
all: $(UTILS)
|
2002-07-27 14:29:35 +00:00
|
|
|
|
|
|
|
install:
|
2006-04-24 17:11:45 +00:00
|
|
|
for x in $(UTILS); do \
|
2004-12-15 20:29:31 +00:00
|
|
|
if [ "$$x" != "none" ]; then \
|
2005-05-09 14:20:11 +00:00
|
|
|
$(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
|
2004-12-15 20:29:31 +00:00
|
|
|
fi; \
|
|
|
|
done
|
2002-07-27 14:29:35 +00:00
|
|
|
|
2006-02-01 18:39:41 +00:00
|
|
|
uninstall:
|
2006-09-29 22:48:43 +00:00
|
|
|
for x in $(ALL_UTILS); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
|
2006-02-01 18:39:41 +00:00
|
|
|
|
2006-12-16 21:24:52 +00:00
|
|
|
clean:
|
2006-09-29 22:48:43 +00:00
|
|
|
rm -f *.o $(ALL_UTILS) check_expr
|
2006-12-16 21:24:52 +00:00
|
|
|
rm -f .*.o.d .*.oo.d
|
2007-10-29 22:24:44 +00:00
|
|
|
rm -f *.s *.i
|
2007-08-15 19:21:27 +00:00
|
|
|
rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c pval.c
|
|
|
|
rm -f aelparse.c aelbison.c conf2ael
|
2007-11-01 15:18:06 +00:00
|
|
|
rm -f utils.c threadstorage.c sha1.c astobj2.c hashtest2
|
2006-09-29 22:48:43 +00:00
|
|
|
|
|
|
|
md5.c: ../main/md5.c
|
|
|
|
@cp $< $@
|
2006-04-24 17:11:45 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
astman: astman.o md5.o
|
2006-10-05 01:43:02 +00:00
|
|
|
astman: LIBS+=$(NEWT_LIB)
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
stereorize: stereorize.o frame.o
|
2006-07-15 16:40:05 +00:00
|
|
|
stereorize: LIBS+=-lm
|
2005-01-21 03:56:22 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
strcompat.c: ../main/strcompat.c
|
|
|
|
@cp $< $@
|
2006-09-15 17:16:00 +00:00
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
../main/ast_expr2.c:
|
|
|
|
@echo " [BISON] ../main/ast_expr2.y -> $@"
|
|
|
|
@bison -o $@ -d --name-prefix=ast_yy ../main/ast_expr2.y
|
2006-05-08 14:34:32 +00:00
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
../main/ast_expr2f.c:
|
|
|
|
@echo " [FLEX] ../main/ast_expr2.fl -> $@"
|
|
|
|
@flex -o $@ --full ../main/ast_expr2.fl
|
2006-04-29 14:48:32 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
pval.c: ../res/ael/pval.c
|
|
|
|
@cp $< $@
|
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
ast_expr2.c: ../main/ast_expr2.c
|
|
|
|
@cp $< $@
|
2005-08-29 22:03:37 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
ast_expr2f.c: ../main/ast_expr2f.c
|
|
|
|
@cp $< $@
|
2005-08-29 22:03:37 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I../main
|
2005-06-21 20:16:51 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
pval.o : ASTCFLAGS+=-DSTANDALONE
|
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o clicompat.o threadstorage.o
|
2006-05-19 19:46:10 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
aelbison.c: ../res/ael/ael.tab.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2007-10-29 22:44:49 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
aelbison.o: ASTCFLAGS+=-I../res/ael -DYYENABLE_NLS=0
|
2006-05-19 19:46:10 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
pbx_ael.c: ../pbx/pbx_ael.c
|
|
|
|
@cp $< $@
|
2006-05-19 19:46:10 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
|
2006-09-29 22:48:43 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
aelparse.c: ../res/ael/ael_lex.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2007-10-29 22:44:49 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
aelparse.o: ASTCFLAGS+=-I../res -DSTANDALONE_AEL
|
|
|
|
|
|
|
|
aelparse: aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
|
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
astobj2.c: ../main/astobj2.c
|
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
utils.c: ../main/utils.c
|
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
sha1.c: ../main/sha1.c
|
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
threadstorage.c: ../main/threadstorage.c
|
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
hashtest2.o: ASTCFLAGS+=-O0
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
hashtest2: hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
extconf.o : extconf.c
|
|
|
|
|
2007-08-20 00:38:20 +00:00
|
|
|
conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
|
2006-04-24 17:41:27 +00:00
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
testexpr2s: ../main/ast_expr2f.c ../main/ast_expr2.c ../main/ast_expr2.h
|
2006-08-25 20:43:51 +00:00
|
|
|
$(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2f.c -o ast_expr2f.o
|
|
|
|
$(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2.c -o ast_expr2.o
|
2006-05-24 18:18:14 +00:00
|
|
|
$(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o
|
2006-04-24 17:41:27 +00:00
|
|
|
rm ast_expr2.o ast_expr2f.o
|
|
|
|
./testexpr2s expr2.testinput
|
|
|
|
|
2006-09-15 17:16:00 +00:00
|
|
|
smsq: smsq.o strcompat.o
|
2006-08-21 02:11:39 +00:00
|
|
|
smsq: LIBS+=$(POPT_LIB)
|
2004-12-11 22:36:27 +00:00
|
|
|
|
2005-08-22 19:29:29 +00:00
|
|
|
streamplayer: streamplayer.o
|
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
muted: muted.o
|
|
|
|
muted: LIBS+=$(AUDIO_LIBS)
|
|
|
|
|
2006-12-16 21:24:52 +00:00
|
|
|
ifneq ($(wildcard .*.d),)
|
|
|
|
include .*.d
|
2006-09-09 03:27:21 +00:00
|
|
|
endif
|