freebsd-ports/net/vde/files/patch-Makefile
Sergey Matveychuk 032fc7a937 VDE is a user-mode ethernet simulation. It's quite useful for
hooking together multiple qemu instances into a single virtual
network without needing root access.  It can also be used for
tunneling or other network simulation tasks.

PR:		ports/76874
Submitted by:	Craig Boston <craig@yekse.gank.org>
2005-03-11 13:51:32 +00:00

40 lines
1.1 KiB
Text

--- Makefile Sat Jan 29 15:02:08 2005
+++ Makefile Sun Jan 30 13:46:59 2005
@@ -1,14 +1,15 @@
-TUNTAP = $(shell [ -e /usr/include/linux/if_tun.h ] && echo -DTUNTAP)
+TUNTAP = $(shell [ -e /usr/include/net/if_tun.h ] && echo -DTUNTAP)
OBJSSW = hash.o port.o vde_switch.o tuntap.o
BINSW = vde_switch
BIN = $(BINSW) dpipe vde_plug
#CFLAGS = -g -Wall $(TUNTAP) -DINFO -O3
-CFLAGS = -Wall $(TUNTAP) -O3
+CFLAGS += -Wall $(TUNTAP) -O
-BIN_DIR ?= /usr/local/bin
-LIB_DIR ?= /usr/local/lib
-MAN_DIR ?= /usr/local/man
+PREFIX ?= /usr/local
+BIN_DIR ?= $(PREFIX)/bin
+LIB_DIR ?= $(PREFIX)/lib
+MAN_DIR ?= $(PREFIX)/man
ifneq ($(TUNTAP),)
OBJS += tuntap.o
@@ -30,13 +31,13 @@
vde_switch.o: vde_switch.c vde.h switch.h hash.h port.h tuntap.h
$(BINSW) : $(OBJSSW)
- $(CC) $(CFLAGS) -o $(BINSW) $(OBJSSW)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BINSW) $(OBJSSW)
dpipe: dpipe.o
- $(CC) $(CFLAGS) -o dpipe dpipe.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o dpipe dpipe.o
vde_plug: vde_plug.o
- $(CC) $(CFLAGS) -o vde_plug vde_plug.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o vde_plug vde_plug.o
clean :
rm -f $(BIN) *.o *~