# # 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: mkdir -p $(DESTDIR)/usr/lib/downtube cp downtube.fcgi $(DESTDIR)/usr/lib/downtube/ mkdir -p $(DESTDIR)/usr/lib/downtube/html cp -r html/* $(DESTDIR)/usr/lib/downtube/html/ uglifyjs html/downtube.js -m -c > $(DESTDIR)/usr/lib/downtube/html/downtube.js htmlmin html/index.html $(DESTDIR)/usr/lib/downtube/html/index.html cleancss -o $(DESTDIR)/usr/lib/downtube/html/downtube.css html/downtube.css downtube.fcgi: $(OBJECTS) # link %.fcgi: %.o $(CXX) $(CPPFLAGS) $(LIBS) -o $@ $^ # .cpp -> .o %.o: %.cpp $(CXX) $(CPPFLAGS) $(INCLUDES) -c $< -o $@ clean: rm -f *.o *.fcgi deb: dpkg-buildpackage .PHONY: clean