summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-30 19:11:51 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-30 19:11:51 +0200
commit28e590d5c2d6d3bb38eae7cb1978af233ecb5f64 (patch)
treef5fdebc89d5420f42a12d97b1df52eb0874e3fec /Makefile
First commit
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..c3a4d5f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,44 @@
+#
+# Makefile
+#
+# Environment: Debian
+#
+
+#CC=gcc-9
+#CXX=g++-9
+CC=clang-10
+CXX=clang++-10
+
+LIBS=-lfcgi
+INCLUDES=-I.
+CFLAGS=-Wall -g -O2 -fPIC
+CPPFLAGS=-Wall -g -O2 -fPIC -std=c++17 -Wpedantic
+HEADERS=file.h
+SOURCES=$(HEADERS:.h=.cpp)
+OBJECTS=$(HEADERS:.h=.o)
+TARGETS=downtube.fcgi
+
+build: $(TARGETS)
+
+all: build
+ ./start.sh
+
+install:
+
+downtube.fcgi: $(OBJECTS)
+
+# link
+%.fcgi: %.o
+ $(CXX) $(CFLAGS) $(LIBS) -o $@ $^
+
+# .cpp -> .o
+%.o: %.cpp
+ $(CXX) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
+
+clean:
+ rm -f *.o *.fcgi
+
+deb:
+ dpkg-buildpackage
+
+.PHONY: clean