[zaptel-commits] tzafrir: branch 1.4 r2870 - in /branches/1.4: Makefile makeopts.in

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Aug 17 04:04:06 CDT 2007


Author: tzafrir
Date: Fri Aug 17 04:04:05 2007
New Revision: 2870

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2870
Log:
Get LDFLAGS and CFLAGS from autoconf. Make sure that they get
everywhere.

Modified:
    branches/1.4/Makefile
    branches/1.4/makeopts.in

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/Makefile?view=diff&rev=2870&r1=2869&r2=2870
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Fri Aug 17 04:04:05 2007
@@ -234,9 +234,20 @@
 MAN_DIR:=$(mandir)/man8
 MOD_DIR:=$(DESTDIR)/lib/modules/$(KVERS)/misc
 
+# Utilities we build with a standard build procedure:
+UTILS		= tor2ee zttool zttest ztmonitor ztspeed sethdlc-new ztcfg \
+		  ztcfg-dude usbfxstest fxstest fxotune ztdiag torisatool
+
+# Makefile mentions them. Source is not included (anynore?)
+UTILS		+= fxsdump ztprovision
+
+# some tests:
+UTILS		+= patgen pattest patlooptest hdlcstress hdlctest hdlcgen \
+		   hdlcverify timertest
+
+UTILSO		= $(UTILS:%=%.o)
+
 BINS:=fxotune fxstest sethdlc-new ztcfg ztdiag ztmonitor ztspeed zttest zttool
-UTILS:=$(filter-out zttool fxstest ztcfg,$(BINS))
-UTILSO:=$(UTILS:%=%.o)
 BINS:=$(filter-out $(MENUSELECT_UTILS),$(BINS))
 MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
 
@@ -294,9 +305,6 @@
 tonezone.lo: tonezone.c
 	$(CC) -c $(LCFLAGS) -o $@ $^
 
-torisatool: torisatool.o
-	$(CC) -o $@ $^
-
 tones.h: gendigits
 	./gendigits > $@
 
@@ -315,7 +323,7 @@
 prereq: config.status tones.h tor2fw.h radfw.h version.h
 
 zttool.o: zttool.c zaptel.h
-	$(CC) -g -c $(NEWT_INCLUDE) $(CFLAGS) -o $@ $<
+zttool.o: CFLAGS+=$(NEWT_INCLUDE)
 
 ztprovision.o: ztprovision.c zaptel.h
 
@@ -331,27 +339,25 @@
 	ranlib $@
 
 $(LTZ_SO): $(LTZ_SO_OBJS)
-	$(CC) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
+	$(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm
 
 ztcfg.c: ztcfg.h
 
 ztcfg-shared: ztcfg.o $(LTZ_SO)
-	$(CC) -o $@ $^ -lm
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm
 
 data:
 	$(MAKE) -C datamods datamods
 
 ztcfg: ztcfg.o $(LTZ_A)
-	$(CC) -o $@ $^ -lm
+ztcfg: LDLIBS+=-lm
 
 ztcfg-dude: ztcfg-dude.o mknotch.o complex.o $(LTZ_SO)
-	$(CC) -o $@ $^ -lm -lstdc++
-
-mknotch.o: mknotch.cc
-	$(CC) -o $@ -c $^
-
-complex.o: complex.cc
-	$(CC) -o $@ -c $^
+ztcfg-dude: LDLIBS+=-lm -lstdc++
+
+# FIXME: we assume CC can build the C++ modules:
+complex.o mknotch.o: %.o: %.cc
+	$(CC) $(CFLAGS) -o $@ -c $<
 
 usbfxstest: LDLIBS+=-lzap
 fxstest: $(LTZ_SO)
@@ -422,7 +428,7 @@
 	$(MAKE) -C mISDNuser-$(MISDNUSERVERSION) install
 
 $(UTILS): %: %.o
-	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
 
 $(UTILSO): %.o: %.c
 	$(CC) $(CFLAGS) -o $@ -c $<

Modified: branches/1.4/makeopts.in
URL: http://svn.digium.com/view/zaptel/branches/1.4/makeopts.in?view=diff&rev=2870&r1=2869&r2=2870
==============================================================================
--- branches/1.4/makeopts.in (original)
+++ branches/1.4/makeopts.in Fri Aug 17 04:04:05 2007
@@ -1,5 +1,7 @@
 CC=@CC@
 HOSTCC=@HOSTCC@
+CFLAGS=@CFLAGS@
+LDFLAGS=@LDFLAGS@
 
 INSTALL=@INSTALL@
 GREP=@GREP@




More information about the zaptel-commits mailing list