summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..35e62b2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+C = gcc
+C++ = g++
+CCFLAGS = -Wall
+LDFLAGS = #-lpthread #-static
+
+OBJS = tunDevice.o tun.c
+EXECUTABLE = anytun
+
+all: $(EXECUTABLE)
+
+anytun: $(OBJS)
+ $(C++) $(OBJS) -o $@ $(LDFLAGS)
+
+tunDevice.o: tunDevice.cpp tunDevice.h openvpn/tun.h
+ $(C++) $(CCFLAGS) $< -c
+
+tun.o: openvpn/tun.c openvpn/tun.h
+ $(C) $(CCFLAGS) $< -c
+
+clean:
+ rm -f *.o
+ rm -f $(EXECUTABLE) \ No newline at end of file