summaryrefslogtreecommitdiffhomepage
path: root/src/Makefile
blob: 03fbe5301a0e54b349713c683458fdcbdeb2c04d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
TARGET=query
# gnu++17 since gcc 5
STANDARD=$(shell g++ -std=gnu++17 -E -x c++ - < /dev/null > /dev/null 2>/dev/null && echo "-std=gnu++17" || echo "-std=gnu++14")
CPPFLAGS=-Wall -O2 $(STANDARD) -fPIC -I/usr/include/$(ARCH)/qt5 -I/usr/include/$(ARCH)/qt5/QtCore
LDFLAGS=-Wall -O2 $(STANDARD) -fPIC
LIBS=-lstdc++ -lfcgi -lQt5Core
OBJS=webbox.o

all: $(TARGET)

$(TARGET): $(OBJS)
	g++ $(LDFLAGS) -o $@ $^ $(LIBS)

%.o: %.cpp
	g++ $(CPPFLAGS) -c -o $@ $<

clean:
	-rm -rf $(TARGET) $(OBJS)

.PHONY: clean all