summaryrefslogtreecommitdiff
path: root/chat
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2021-01-01 19:44:07 +1100
committerPaul Mackerras <paulus@ozlabs.org>2021-01-01 19:55:24 +1100
commit4087ec556b1ccee15d8e97153f3800b79982f8ba (patch)
tree5f0bddefef66625b7d3a734dfcf0c89cb6ad9f68 /chat
parent248c11d375c54a8b5fc61c6659be2f8826e889ec (diff)
downloadppp-4087ec556b1ccee15d8e97153f3800b79982f8ba.tar.gz
Add cross-compilation support on Linux
This adds three new command-line options to the configure script: --cross_compile=<prefix> (default "") --cc=<compiler> (default cc) --cflags=<compile flags> (default -g -O2 -pipe) These get propagated to the Makefiles in the subdirectories. The cross-compile prefix is prepended to the CC value, so for example if you do "./configure --cross_compile=powerpc64le-linux-" then everything gets compiled and linked using powerpc64le-linux-cc. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'chat')
-rw-r--r--chat/Makefile.linux5
1 files changed, 3 insertions, 2 deletions
diff --git a/chat/Makefile.linux b/chat/Makefile.linux
index f082dab..407cc12 100644
--- a/chat/Makefile.linux
+++ b/chat/Makefile.linux
@@ -1,4 +1,6 @@
-# $Id: Makefile.linux,v 1.15 2006/06/04 05:07:46 paulus Exp $
+CROSS_COMPILE=@CROSS_COMPILE@
+CC=$(CROSS_COMPILE)@CC@
+COPTS=@CFLAGS@
DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
@@ -10,7 +12,6 @@ CDEF3= -UNO_SLEEP # Use the usleep function
CDEF4= -DFNDELAY=O_NDELAY # Old name value
CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
-COPTS= -O2 -g -pipe
CFLAGS= $(COPTS) $(CDEFS)
INSTALL= install