From 4087ec556b1ccee15d8e97153f3800b79982f8ba Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Fri, 1 Jan 2021 19:44:07 +1100 Subject: Add cross-compilation support on Linux This adds three new command-line options to the configure script: --cross_compile= (default "") --cc= (default cc) --cflags= (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 --- pppstats/Makefile.linux | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pppstats') diff --git a/pppstats/Makefile.linux b/pppstats/Makefile.linux index 1819370..ddfe0cc 100644 --- a/pppstats/Makefile.linux +++ b/pppstats/Makefile.linux @@ -1,7 +1,10 @@ # # pppstats makefile -# $Id: Makefile.linux,v 1.9 2006/06/04 05:07:46 paulus Exp $ # +CROSS_COMPILE=@CROSS_COMPILE@ +CC=$(CROSS_COMPILE)@CC@ +COPTS=@CFLAGS@ + DESTDIR = $(INSTROOT)@DESTDIR@ BINDIR = $(DESTDIR)/sbin MANDIR = $(DESTDIR)/share/man/man8 @@ -9,8 +12,6 @@ MANDIR = $(DESTDIR)/share/man/man8 PPPSTATSRCS = pppstats.c PPPSTATOBJS = pppstats.o -#CC = gcc -COPTS = -O COMPILE_FLAGS = -I../include LIBS = -- cgit v1.2.1