freebsd-ports/net/vde/files/patch-Makefile
Raphael Kubo da Costa b195cfd7e9 - Fix the build when gcc is not present.
- Support staging.
- Set LICENSE.
- Switch from USE_GMAKE to USES=gmake.
2014-01-03 05:40:21 +00:00

40 lines
1.1 KiB
Text

--- Makefile.orig 2004-08-27 10:24:43.000000000 +0300
+++ Makefile 2014-01-03 07:27:47.000000000 +0200
@@ -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 ?= $(DESTDIR)$(PREFIX)/bin
+LIB_DIR ?= $(DESTDIR)$(PREFIX)/lib
+MAN_DIR ?= $(DESTDIR)$(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 *~