openbsd-ports/net/arping/patches/patch-Makefile
2005-05-23 23:58:03 +00:00

46 lines
1.7 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.5 2005/05/23 23:58:03 mjc Exp $
--- Makefile.orig Fri Sep 24 10:43:37 2004
+++ Makefile Sun May 22 14:11:27 2005
@@ -19,9 +19,9 @@ SOLARIS=0
FREEBSD=0
MACOSX=0
-CC=gcc
+#CC=gcc
# explicit pcap include dir is for redhat which is fux0red
-CFLAGS=-g -I/usr/local/include -L/usr/local/lib -DFINDIF=$(FINDIF) -DUSE_NETIF=$(USE_NETIF) -DOPENBSD=$(OPENBSD) -DLINUX=$(LINUX) -DSOLARIS=$(SOLARIS) -DFREEBSD=$(FREEBSD) -DMACOSX=$(MACOSX) -I/usr/include/pcap
+CFLAGS=-I${LOCALBASE}/include -L${LOCALBASE}/lib -DFINDIF=$(FINDIF) -DUSE_NETIF=$(USE_NETIF) -DOPENBSD=$(OPENBSD) -DLINUX=$(LINUX) -DSOLARIS=$(SOLARIS) -DFREEBSD=$(FREEBSD) -DMACOSX=$(MACOSX) -I/usr/include/pcap
all: message arping2
@@ -83,20 +83,22 @@ solaris:
$(MAKE) USE_NETIF=0 SOLARIS=1 arping1-make
install:
- install -c arping /usr/local/bin/arping
- install arping.8 /usr/local/man/man8/arping.8
+ ${BSD_INSTALL_PROGRAM} -c arping ${PREFIX}/bin/arping
+ ${BSD_INSTALL_MAN} arping.8 ${PREFIX}/man/man8/arping.8
+ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/doc/arping
+ ${BSD_INSTALL_DATA} README ${PREFIX}/share/doc/arping/README
arping.o: arping.c
- $(CC) -Wall $(CFLAGS) -c `libnet-config --defines` `libnet-config --cflags` arping.c
+ $(CC) -Wall `libnet-config-1.0 --defines` `libnet-config-1.0 --cflags` $(CFLAGS) -c arping.c
O_arping=arping.o
arping1-make: $(O_arping)
- $(CC) $(CFLAGS) -g -o arping $(O_arping) `libnet-config --libs` -lpcap
+ $(CC) `libnet-config-1.0 --libs` $(CFLAGS) -g -o arping $(O_arping) -lpcap
SYS=$(shell uname -s)
-ifeq ($(SYS),SunOS)
-EXTRA_LIBS=-lsocket -lnsl
-endif
+#ifeq ($(SYS),SunOS)
+#EXTRA_LIBS=-lsocket -lnsl
+#endif
O_arping2=arping-2/arping.c
arping2: arping-2/arping