openbsd-ports/x11/driftnet/patches/patch-Makefile

77 lines
2.2 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-Makefile,v 1.1.1.1 2007/04/30 13:38:50 claudio Exp $
--- Makefile.orig Tue Jul 9 21:26:41 2002
+++ Makefile Tue Apr 24 15:05:24 2007
@@ -16,18 +16,18 @@
#CC = gcc
# Basic compiler, linker flags; should not need any changes.
-CFLAGS += -g -Wall
-LDFLAGS += -g
+#CFLAGS += -g -Wall
+#LDFLAGS += -g
# You might need these if libpcap is installed somewhere random.
-CFLAGS += -I/usr/include/pcap
+CFLAGS += -I/usr/local/include
#LDFLAGS += -L/path/to/libpcap.so
# Required on Linux to get BSDish definitions of the TCP/IP structs.
-CFLAGS += -D_BSD_SOURCE
+#CFLAGS += -D_BSD_SOURCE
# We always need the pcap and pthread libraries.
-LDLIBS += -lpcap -lpthread
+LDLIBS += -lpcap -pthread
# Optional C compiler and linker flags. Typical driftnet builds have support
# for displaying captured images in an X window, and need the following flags:
@@ -72,7 +72,7 @@ BINS = driftnet
OBJS = $(SRCS:.c=.o)
-default: driftnet driftnet.1
+all: driftnet driftnet.1
driftnet: depend $(OBJS)
$(CC) -o driftnet $(OBJS) $(LDFLAGS) $(LDLIBS)
@@ -80,15 +80,9 @@ driftnet: depend $(OBJS)
driftnet.1: driftnet.1.in Makefile
( echo '.\" DO NOT EDIT THIS FILE-- edit driftnet.1.in instead' ; sed s/@@@VERSION@@@/$(VERSION)/ ) < driftnet.1.in > driftnet.1
-endianness: endian
- ./endian > endianness
+%.o: %.c Makefile
+ $(CC) $(CFLAGS) -c -o $@ $<
-endian: endian.c
- $(CC) $(CFLAGS) -o endian endian.c
-
-%.o: %.c Makefile endianness
- $(CC) $(CFLAGS) `cat endianness` -c -o $@ $<
-
clean: nodepend
rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1 endian endianness
@@ -102,13 +96,19 @@ tarball: nodepend $(SRCS) $(HDRS) $(TXTS)
rm -rf driftnet-$(VERSION)
mv driftnet-$(VERSION).tar.gz ..
-depend: endianness
- makedepend -- $(CFLAGS) `cat endianness` -- $(SRCS)
+depend:
+ makedepend -- $(CFLAGS) -- $(SRCS)
touch depend
rm -f Makefile.bak
nodepend:
makedepend -- --
rm -f depend Makefile.bak
+
+install:
+ ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} \
+ -m ${BINMODE} driftnet ${PREFIX}/bin/driftnet
+ ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+ driftnet.1 ${PREFIX}/man/man1/driftnet.1
# DO NOT DELETE