85 lines
2.5 KiB
Plaintext
85 lines
2.5 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.2 2010/03/20 16:52:08 jasper Exp $
|
|
--- Makefile.orig Tue Jul 9 21:26:41 2002
|
|
+++ Makefile Fri Jan 29 16:15:17 2010
|
|
@@ -16,23 +16,23 @@
|
|
#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:
|
|
-CFLAGS += `gtk-config --cflags`
|
|
-LDLIBS += -ljpeg -lungif `gtk-config --libs`
|
|
+CFLAGS += `pkg-config --cflags gtk+-2.0`
|
|
+LDLIBS += -ljpeg -lungif `pkg-config --libs gtk+-2.0`
|
|
|
|
# Alternatively, you can build a version of driftnet which can only be used
|
|
# in `adjunct' mode as the back end for some other image-processing program. To
|
|
@@ -72,23 +72,17 @@ BINS = driftnet
|
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
-default: driftnet driftnet.1
|
|
+all: driftnet driftnet.1
|
|
|
|
-driftnet: depend $(OBJS)
|
|
+driftnet: $(OBJS)
|
|
$(CC) -o driftnet $(OBJS) $(LDFLAGS) $(LDLIBS)
|
|
|
|
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
|