diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2021-01-01 19:44:07 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2021-01-01 19:55:24 +1100 |
commit | 4087ec556b1ccee15d8e97153f3800b79982f8ba (patch) | |
tree | 5f0bddefef66625b7d3a734dfcf0c89cb6ad9f68 /pppdump | |
parent | 248c11d375c54a8b5fc61c6659be2f8826e889ec (diff) | |
download | ppp-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 'pppdump')
-rw-r--r-- | pppdump/Makefile.linux | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pppdump/Makefile.linux b/pppdump/Makefile.linux index 742a4b8..a94187f 100644 --- a/pppdump/Makefile.linux +++ b/pppdump/Makefile.linux @@ -1,9 +1,12 @@ +CROSS_COMPILE=@CROSS_COMPILE@ +CC=$(CROSS_COMPILE)@CC@ +COPTS=@CFLAGS@ + DESTDIR = $(INSTROOT)@DESTDIR@ BINDIR = $(DESTDIR)/sbin MANDIR = $(DESTDIR)/share/man/man8 -CFLAGS ?= -O -CFLAGS += -I../include/net +CFLAGS = $(COPTS) -I../include/net OBJS = pppdump.o bsd-comp.o deflate.o zlib.o INSTALL= install |