From 61ed09c934e66fd069eef7b07289c7de751d4edf Mon Sep 17 00:00:00 2001 From: na Date: Tue, 24 Jan 2017 11:18:01 +0100 Subject: changed ninja to makefile --- makefile | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..d9d85ca --- /dev/null +++ b/makefile @@ -0,0 +1,48 @@ +###### BUILD ###### + +INCLUDES = -Isrc -I/usr/include -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore +COMPILER = clang -std=c++11 -Wall -O3 -fPIC -MMD $(INCLUDES) -c $< -o $@ +MOC = moc $(INCLUDES) -o $@ $< +LINKER = g++ -o $@ $? -lQt5Xdg -lQt5Widgets -lQt5Gui -lQt5Core + + +# this prevents make from deleting the generated moc_*.cpp files +# so that the including of the dep-files will not fail +.SECONDARY: + + +data/usr/bin/mlde-lead: build/lead.o build/sensor.o build/main.o build/moc_lead.o build/moc_sensor.o + $(LINKER) + +build/%.o: src/%.cpp + $(COMPILER) + +build/moc_%.o: build/moc_%.cpp + $(COMPILER) + +build/moc_%.cpp: src/%.h + $(MOC) + +-include build/*.d + + +###### CLEAN ###### + +clean: + rm build/* + rm data/usr/bin/mlde-lead + + +###### INSTALL ###### + +install: + cp -r data/* / + + +###### UNINSTALL ###### + +uninstall: + rm /usr/bin/mlde-lead + + +.PHONY: clean install uninstall \ No newline at end of file -- cgit v1.2.3