]> git.sesse.net Git - greproxy/blobdiff - Makefile
Add a simple Makefile and .gitignore.
[greproxy] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..a0a8774
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+CXXFLAGS=-std=gnu++11 -O2 -g
+
+TUNGRE_OBJS=greprotocol.o reorderer.o tungre.o tunprotocol.o
+
+tungre: $(TUNGRE_OBJS)
+       $(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)
+
+%.o: %.cpp
+       $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
+DEPS=$(TUNGRE_OBJS:.o=.d)
+-include $(DEPS)
+
+clean:
+       $(RM) $(TUNGRE_OBJS) $(DEPS) gretun