| 
									
										
										
										
											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
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-06-22 15:38:13 +00:00
										 |  |  | .PHONY: clean clean-depend all depend uninstall | 
					
						
							| 
									
										
										
										
											2006-06-22 11:27:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-08-21 14:45:58 +00:00
										 |  |  | UTILS:=astman smsq stereorize streamplayer aelparse muted | 
					
						
							| 
									
										
										
										
											2004-06-04 15:44:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-04-24 17:11:45 +00:00
										 |  |  | ifeq (${OSARCH},SunOS) | 
					
						
							| 
									
										
										
										
											2006-08-21 02:11:39 +00:00
										 |  |  |   LIBS+=../main/strcompat.o -lsocket -lnsl | 
					
						
							| 
									
										
										
										
											2005-08-30 02:54:02 +00:00
										 |  |  | 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)) | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-06 23:18:45 +00:00
										 |  |  | include $(ASTTOPDIR)/Makefile.rules | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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-05-30 16:23:34 +00:00
										 |  |  | 	for x in $(UTILS); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done | 
					
						
							| 
									
										
										
										
											2006-02-01 18:39:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-02-12 16:52:42 +00:00
										 |  |  | clean-depend: | 
					
						
							|  |  |  | 	rm -f .depend | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | clean: clean-depend | 
					
						
							| 
									
										
										
										
											2006-05-30 16:23:34 +00:00
										 |  |  | 	rm -f *.o $(UTILS) check_expr | 
					
						
							| 
									
										
										
										
											2006-04-24 17:11:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-08-21 02:11:39 +00:00
										 |  |  | $(eval $(call ast_make_final,astman,astman.o ../main/md5.o)) | 
					
						
							|  |  |  | astman: LIBS+=-lnewt -lslang -ldl | 
					
						
							| 
									
										
										
										
											2003-05-06 00:00:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-15 16:40:05 +00:00
										 |  |  | $(eval $(call ast_make_final,stereorize,stereorize.o frame.o)) | 
					
						
							|  |  |  | stereorize: LIBS+=-lm | 
					
						
							| 
									
										
										
										
											2005-01-21 03:56:22 +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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-08-21 02:11:39 +00:00
										 |  |  | $(eval $(call ast_make_o_c,ast_expr2.o,../main/ast_expr2.c)) | 
					
						
							| 
									
										
										
										
											2005-08-29 22:03:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-08-21 02:11:39 +00:00
										 |  |  | $(eval $(call ast_make_o_c,ast_expr2f.o,../main/ast_expr2f.c)) | 
					
						
							| 
									
										
										
										
											2006-08-25 20:43:51 +00:00
										 |  |  | ast_expr2f.o: CFLAGS+=-DSTANDALONE_AEL | 
					
						
							| 
									
										
										
										
											2005-08-29 22:03:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-06 23:18:45 +00:00
										 |  |  | $(eval $(call ast_make_final,check_expr,check_expr.c ast_expr2.o ast_expr2f.o)) | 
					
						
							| 
									
										
										
										
											2005-06-21 20:16:51 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-06 23:18:45 +00:00
										 |  |  | $(eval $(call ast_make_o_c,aelflex.o,../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h)) | 
					
						
							| 
									
										
										
										
											2006-08-25 20:43:51 +00:00
										 |  |  | aelflex.o: CFLAGS+=-I../pbx -DSTANDALONE_AEL | 
					
						
							| 
									
										
										
										
											2006-05-19 19:46:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-06 23:18:45 +00:00
										 |  |  | $(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 | 
					
						
							| 
									
										
										
										
											2006-05-19 19:46:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-06 23:18:45 +00:00
										 |  |  | $(eval $(call ast_make_o_c,pbx_ael.o,../pbx/pbx_ael.c)) | 
					
						
							| 
									
										
										
										
											2006-08-21 02:11:39 +00:00
										 |  |  | pbx_ael.o: CFLAGS+=-DSTANDALONE_AEL | 
					
						
							| 
									
										
										
										
											2006-05-19 19:46:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-06 23:18:45 +00:00
										 |  |  | $(eval $(call ast_make_final,aelparse,aelflex.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o)) | 
					
						
							| 
									
										
										
										
											2006-04-24 17:41:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-06 23:18:45 +00:00
										 |  |  | $(eval $(call ast_make_o_c,ael_main.o,ael_main.c ../include/asterisk/ael_structs.h)) | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-12-11 22:36:27 +00:00
										 |  |  | smsq: smsq.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-08-26 23:58:47 +00:00
										 |  |  | -include .depend | 
					
						
							| 
									
										
										
										
											2003-05-06 00:00:20 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | depend: .depend | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .depend: | 
					
						
							| 
									
										
										
										
											2005-06-20 17:26:08 +00:00
										 |  |  | 	../build_tools/mkdep $(CFLAGS) `ls *.c` |