netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch/iputils] tweak makefile to be more flexible
@ 2006-12-20 15:23 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2006-12-20 15:23 UTC (permalink / raw)
  To: netdev


[-- Attachment #1.1: Type: text/plain, Size: 166 bytes --]

this patch tweaks the makefile so that it respects user environment variables 
such as CC/CFLAGS/etc... and cleans out some cruft that is no longer utilized
-mike

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: iputils-makefile.patch --]
[-- Type: text/x-diff, Size: 1222 bytes --]

Respect user environment variables.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

diff --git a/Makefile b/Makefile
index 54c1de5..7a7b045 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,18 @@
 # Path to parent kernel include files directory
 LIBC_INCLUDE=/usr/include
 
-DEFINES= 
-
 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
 LDLIBS=-lresolv
-ADDLIB=
 
 #options if you compile with libc5, and without a bind>=4.9.4 libresolv
 # NOT AVAILABLE. Please, use libresolv.
 
-CC=gcc
+CC ?= gcc
 # What a pity, all new gccs are buggy and -Werror does not work. Sigh.
 #CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
-CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES) 
+CFLAGS ?= -O2 -g
+CFLAGS += -Wstrict-prototypes -Wall
+CPPFLAGS += -D_GNU_SOURCE
 
 IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
 IPV6_TARGETS=tracepath6 traceroute6 ping6
@@ -33,9 +31,8 @@ ping.o ping6.o ping_common.o: ping_common.h
 tftpd.o tftpsubs.o: tftp.h
 
 rdisc_srv: rdisc_srv.o
-
 rdisc_srv.o: rdisc.c
-	$(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
 
 
 check-kernel:

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-20 15:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-20 15:23 [patch/iputils] tweak makefile to be more flexible Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).