ports/net/hanstunnel/files/patch-Makefile
Felippe de Meirelles Motta 946b368825 Hans makes it possible to tunnel IPv4 through ICMP echo packets, so you
could call it a ping tunnel. This can be useful when you find yourself
in the situation that your Internet access is firewalled, but pings are
allowed.

WWW: http://code.gerade.org/hans/

PR:		ports/177649
Submitted by:	Alexander Panyushkin <vsityz@gmail.com>
2013-06-28 20:45:36 +00:00

73 lines
2.4 KiB
Text

--- Makefile.orig 2010-02-17 17:30:21.000000000 +0200
+++ Makefile 2013-04-04 15:18:50.818219413 +0300
@@ -1,53 +1,51 @@
-LDFLAGS = `sh osflags ld $(MODE)`
-CFLAGS = -c -g `sh osflags c $(MODE)`
-TUN_DEV_FILE = `sh osflags dev $(MODE)`
-GCC = gcc
-GPP = g++
+TUN_DEV_FILE = tun_dev_freebsd.c
+GCC = ${CC}
+GPP = ${CXX}
all: hans
hans: tun.o sha1.o main.o client.o server.o auth.o worker.o time.o tun_dev.o echo.o exception.o utility.o
- $(GPP) -o hans tun.o sha1.o main.o client.o server.o auth.o worker.o time.o tun_dev.o echo.o exception.o utility.o $(LDFLAGS)
+ ${GPP} -o hans tun.o sha1.o main.o client.o server.o auth.o worker.o time.o tun_dev.o echo.o exception.o utility.o ${LDFLAGS}
utility.o: utility.cpp utility.h
- $(GPP) -c utility.cpp $(CFLAGS)
+ ${GPP} -c utility.cpp ${CFLAGS}
exception.o: exception.cpp exception.h
- $(GPP) -c exception.cpp $(CFLAGS)
+ ${GPP} -c exception.cpp ${CFLAGS}
echo.o: echo.cpp echo.h exception.h
- $(GPP) -c echo.cpp $(CFLAGS)
+ ${GPP} -c echo.cpp ${CFLAGS}
tun.o: tun.cpp tun.h exception.h utility.h tun_dev.h
- $(GPP) -c tun.cpp $(CFLAGS)
+ ${GPP} -c tun.cpp ${CFLAGS}
tun_dev.o:
- $(GCC) -c $(TUN_DEV_FILE) -o tun_dev.o $(CFLAGS)
+ ${GCC} -c ${TUN_DEV_FILE} -o tun_dev.o ${CFLAGS}
sha1.o: sha1.cpp sha1.h
- $(GPP) -c sha1.cpp $(CFLAGS)
+ ${GPP} -c sha1.cpp ${CFLAGS}
main.o: main.cpp client.h server.h exception.h worker.h auth.h time.h echo.h tun.h tun_dev.h
- $(GPP) -c main.cpp $(CFLAGS)
+ ${GPP} -c main.cpp ${CFLAGS}
client.o: client.cpp client.h server.h exception.h config.h worker.h auth.h time.h echo.h tun.h tun_dev.h
- $(GPP) -c client.cpp $(CFLAGS)
+ ${GPP} -c client.cpp ${CFLAGS}
server.o: server.cpp server.h client.h utility.h config.h worker.h auth.h time.h echo.h tun.h tun_dev.h
- $(GPP) -c server.cpp $(CFLAGS)
+ ${GPP} -c server.cpp ${CFLAGS}
auth.o: auth.cpp auth.h sha1.h utility.h
- $(GPP) -c auth.cpp $(CFLAGS)
+ ${GPP} -c auth.cpp ${CFLAGS}
worker.o: worker.cpp worker.h tun.h exception.h time.h echo.h tun_dev.h config.h
- $(GPP) -c worker.cpp $(CFLAGS)
+ ${GPP} -c worker.cpp ${CFLAGS}
time.o: time.cpp time.h
- $(GPP) -c time.cpp $(CFLAGS)
+ ${GPP} -c time.cpp ${CFLAGS}
clean:
rm -f tun.o sha1.o main.o client.o server.o auth.o worker.o time.o tun_dev.o echo.o exception.o utility.o tunemu.o hans
tunemu.o: tunemu.h tunemu.c
- $(GCC) -c tunemu.c -o tunemu.o
+ ${GCC} -c tunemu.c -o tunemu.o