aboutsummaryrefslogtreecommitdiffstats
path: root/utils/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/Makefile')
-rw-r--r--utils/Makefile34
1 files changed, 19 insertions, 15 deletions
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 <markster@digium.com>
#
@@ -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