[zaptel-commits] tzafrir: branch tzafrir/makefile r1481 - /team/tzafrir/makefile/

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Thu Sep 28 15:08:01 MST 2006


Author: tzafrir
Date: Thu Sep 28 17:08:01 2006
New Revision: 1481

URL: http://svn.digium.com/view/zaptel?rev=1481&view=rev
Log:
A first stab at separating HOSTCC from CC . 
If autoconf gives a HOSTCC, we'll use it. Otherwise: use CC.
This will still not work with the menuselect directory (not in this repo) 
and in the wct4xxp/ directory, whose Makefile is broken as the parent.

Modified:
    team/tzafrir/makefile/Makefile
    team/tzafrir/makefile/configure
    team/tzafrir/makefile/configure.ac
    team/tzafrir/makefile/makeopts.in

Modified: team/tzafrir/makefile/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/makefile/Makefile?rev=1481&r1=1480&r2=1481&view=diff
==============================================================================
--- team/tzafrir/makefile/Makefile (original)
+++ team/tzafrir/makefile/Makefile Thu Sep 28 17:08:01 2006
@@ -9,8 +9,6 @@
 
 .PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules linux24 linux26 xpp tests devel data stackcheck install-udev config update install-programs install-modules install-linux24 install-linux26 firmware install-include install-libs menuonfig
 
-HOSTCC=gcc
-CC=gcc
 PWD=$(shell pwd)
 
 ifeq ($(DEB_HOST_GNU_TYPE),)
@@ -230,13 +228,13 @@
 tor2ee: LDLIBS+=-lpci
 
 zonedata.lo: zonedata.c
-	$(CC) -c $(LCFLAGS) -o $@ $^
+	$(HOSTCC) -c $(LCFLAGS) -o $@ $^
 
 tonezone.lo: tonezone.c
-	$(CC) -c $(LCFLAGS) -o $@ $^
+	$(HOSTCC) -c $(LCFLAGS) -o $@ $^
 
 torisatool: torisatool.o
-	$(CC) -o $@ $^
+	$(HOSTCC) -o $@ $^
 
 tones.h: gendigits
 	./gendigits > $@
@@ -257,7 +255,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 $@ $<
+	$(HOSTCC) -g -c $(NEWT_INCLUDE) $(CFLAGS) -o $@ $<
 
 ztprovision.o: ztprovision.c zaptel.h
 
@@ -273,27 +271,27 @@
 	ranlib $@
 
 $(LTZ_SO): $(LTZ_SO_OBJS)
-	$(CC) -shared -o $@ $^ -lm
+	$(HOSTCC) -shared -o $@ $^ -lm
 
 ztcfg.c: ztcfg.h
 
 ztcfg-shared: ztcfg.o $(LTZ_SO)
-	$(CC) -o $@ $^ -lm
+	$(HOSTCC) -o $@ $^ -lm
 
 data:
 	$(MAKE) -C datamods datamods
 
 ztcfg: ztcfg.o $(LTZ_A)
-	$(CC) -o $@ $^ -lm
+	$(HOSTCC) -o $@ $^ -lm
 
 ztcfg-dude: ztcfg-dude.o mknotch.o complex.o $(LTZ_SO)
-	$(CC) -o $@ $^ -lm
+	$(HOSTCC) -o $@ $^ -lm
 
 mknotch.o: mknotch.cc
-	$(CC) -o $@ -c $^
+	$(HOSTCC) -o $@ -c $^
 
 complex.o: complex.cc
-	$(CC) -o $@ -c $^
+	$(HOSTCC) -o $@ -c $^
 
 usbfxstest: LDLIBS+=-lzap
 fxstest: $(LTZ_SO)
@@ -314,10 +312,10 @@
 	$(MAKE) -C mISDNuser install
 
 $(UTILS): %: %.o
-	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
+	$(HOSTCC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
 
 $(UTILSO): %.o: %.c
-	$(CC) $(CFLAGS) -o $@ -c $<
+	$(HOSTCC) $(CFLAGS) -o $@ -c $<
 
 devices:
 ifndef DYNFS

Modified: team/tzafrir/makefile/configure
URL: http://svn.digium.com/view/zaptel/team/tzafrir/makefile/configure?rev=1481&r1=1480&r2=1481&view=diff
==============================================================================
--- team/tzafrir/makefile/configure (original)
+++ team/tzafrir/makefile/configure Thu Sep 28 17:08:01 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1297 .
+# From configure.ac Revision: 1435 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -313,7 +313,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE GREP LN EGREP CURSES_LIB CURSES_INCLUDE PBX_LIBCURSES NCURSES_LIB NCURSES_INCLUDE PBX_LIBNCURSES NEWT_LIB NEWT_INCLUDE PBX_LIBNEWT USB_LIB USB_INCLUDE PBX_LIBUSB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE HOSTCC GREP LN EGREP CURSES_LIB CURSES_INCLUDE PBX_LIBCURSES NCURSES_LIB NCURSES_INCLUDE PBX_LIBNCURSES NEWT_LIB NEWT_INCLUDE PBX_LIBNEWT USB_LIB USB_INCLUDE PBX_LIBUSB LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -2624,6 +2624,10 @@
 
 
 
+# Set the default value of HOSTCC from CC if --host was not provided:
+HOSTCC=${HOSTCC:=${CC}}
+
+
 # Extract the first word of "grep", so it can be a program name with args.
 set dummy grep; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -5409,6 +5413,7 @@
 s, at INSTALL_DATA@,$INSTALL_DATA,;t t
 s, at LN_S@,$LN_S,;t t
 s, at GNU_MAKE@,$GNU_MAKE,;t t
+s, at HOSTCC@,$HOSTCC,;t t
 s, at GREP@,$GREP,;t t
 s, at LN@,$LN,;t t
 s, at EGREP@,$EGREP,;t t

Modified: team/tzafrir/makefile/configure.ac
URL: http://svn.digium.com/view/zaptel/team/tzafrir/makefile/configure.ac?rev=1481&r1=1480&r2=1481&view=diff
==============================================================================
--- team/tzafrir/makefile/configure.ac (original)
+++ team/tzafrir/makefile/configure.ac Thu Sep 28 17:08:01 2006
@@ -36,6 +36,10 @@
 AC_PROG_LN_S
 AST_CHECK_GNU_MAKE
 
+# Set the default value of HOSTCC from CC if --host was not provided:
+HOSTCC=${HOSTCC:=${CC}}
+AC_SUBST(HOSTCC)
+
 AC_PATH_PROG([GREP], [grep], :)
 AC_PATH_PROG([SHELL], [sh], :)
 AC_PATH_PROG([LN], [ln], :)

Modified: team/tzafrir/makefile/makeopts.in
URL: http://svn.digium.com/view/zaptel/team/tzafrir/makefile/makeopts.in?rev=1481&r1=1480&r2=1481&view=diff
==============================================================================
--- team/tzafrir/makefile/makeopts.in (original)
+++ team/tzafrir/makefile/makeopts.in Thu Sep 28 17:08:01 2006
@@ -1,5 +1,5 @@
 CC=@CC@
-HOST_CC=@CC@
+HOSTCC=@HOSTCC@
 
 INSTALL=@INSTALL@
 GREP=@GREP@



More information about the zaptel-commits mailing list