From 574e14cbea69b596a9a540b6401f2a087ec1e9ac Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Mon, 24 Apr 2006 17:11:45 +0000 Subject: Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- utils/Makefile | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'utils') diff --git a/utils/Makefile b/utils/Makefile index 93da99338..57cbb6200 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -3,7 +3,7 @@ # # Various utilities # -# Copyright (C) 1999-2005, Digium +# Copyright (C) 1999-2006, Digium # # Mark Spencer # @@ -14,27 +14,25 @@ # # Don't use ast mm routines # -CFLAGS+=-DNO_AST_MM +UTILS:=astman smsq stereorize streamplayer -TARGET=stereorize streamplayer - -ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),) - TARGET+=smsq +ifeq (${OSARCH},SunOS) + SOL=../strcompat.o + SOLLIBS=-lsocket -lnsl endif -ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/newt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h),) - TARGET+=astman +ifeq ($(POPT_LIB),) + UTILS:=$(filter-out smsq,$(UTILS)) endif -ifeq (${OSARCH},SunOS) - SOL=../strcompat.o - SOLLIBS=-lsocket -lnsl +ifeq ($(NEWT_LIB),) + UTILS:=$(filter-out astman,$(UTILS)) endif -all: depend $(TARGET) +all: depend $(UTILS) install: - for x in $(TARGET); do \ + for x in $(UTILS); do \ if [ "$$x" != "none" ]; then \ $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \ fi; \ @@ -47,11 +45,14 @@ clean-depend: rm -f .depend clean: clean-depend - rm -f *.o astman smsq stereorize streamplayer check_expr + rm -f *.o $(TARGET) check_expr rm -f ast_expr2.o ast_expr2f.o +astman.o: astman.c + $(CC) $(CFLAGS) -include ../include/autoconfig.h -c -o $@ $< + astman: astman.o ../md5.o - $(CC) $(CFLAGS) -o astman astman.o ../md5.o -lnewt + $(CC) -D_GNU_SOURCE -o $@ $< ../md5.o -lnewt stereorize: stereorize.o frame.o $(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm @@ -65,6 +66,9 @@ ast_expr2f.o: ../ast_expr2f.c check_expr: check_expr.c ast_expr2.o ast_expr2f.o $(CC) $(CFLAGS) -o $@ $^ +smsq.o: smsq.c + $(CC) $(CFLAGS) -include ../include/autoconfig.h -c -o $@ $< + smsq: smsq.o $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt -- cgit v1.2.3