diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | README.md | 8 | ||||
| -rw-r--r-- | build.ninja | 46 | ||||
| -rwxr-xr-x | data/usr/bin/mlde-lead | bin | 45056 -> 45056 bytes | |||
| -rw-r--r-- | makefile | 48 |
6 files changed, 56 insertions, 52 deletions
@@ -1,3 +1,2 @@ .vscode -build/* -.ninja*
\ No newline at end of file +build/*
\ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 53cefb1..8fdebc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 01/24/2017 +- changed built-tool back to makefile + # 01/21/2017 - changed namespace to mlde @@ -22,11 +22,11 @@ # Build it -*lead* uses [clang](http://clang.llvm.org/) as compiler, [g++](https://gcc.gnu.org/) as linker and [ninja](https://github.com/ninja-build/ninja) as build-tool. +*lead* uses [clang](http://clang.llvm.org/) as compiler, [g++](https://gcc.gnu.org/) as linker and [make](https://www.gnu.org/software/make/) as build-tool. To build *lead* open a terminal in the root folder of the repository and: - $ ninja + $ make ### Dependencies - Qt5Widgets @@ -42,7 +42,7 @@ A build `mlde-lead` is provided in `data/usr/bin/mlde-lead`. It was build on my To install *lead* open a terminal in the root folder of the repository and: - $ sudo ninja install + $ sudo make install # Configure it @@ -91,7 +91,7 @@ Start *lead* as background process: To uninstall *lead* open a terminal in the root folder of the repository and: - $ sudo ninja uninstall + $ sudo make uninstall # Drawbacks diff --git a/build.ninja b/build.ninja deleted file mode 100644 index 9c80a73..0000000 --- a/build.ninja +++ /dev/null @@ -1,46 +0,0 @@ -###### 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 - - -rule cpp - depfile = $out.d - command = clang -std=c++11 -Wall -O3 -fPIC -MMD -MF $out.d $includes -c $in -o $out - -rule link - command = g++ -o $out $in -lQt5Widgets -lQt5Gui -lQt5Core - -rule moc - command = moc $includes -o $out $in - - -build build/lead.moc.cpp: moc src/lead.h -build build/sensor.moc.cpp: moc src/sensor.h - - -build build/main.o: cpp src/main.cpp -build build/lead.o: cpp src/lead.cpp -build build/sensor.o: cpp src/sensor.cpp - - -build build/lead.moc.o: cpp build/lead.moc.cpp -build build/sensor.moc.o: cpp build/sensor.moc.cpp - - -build data/usr/bin/mlde-lead: link build/main.o build/lead.o build/sensor.o build/lead.moc.o build/sensor.moc.o - -default data/usr/bin/mlde-lead - - -###### INSTALL ###### - -rule install - command = cp -r data/* / - -build install: install - - -rule uninstall - command = rm /usr/bin/mlde-lead - -build uninstall: uninstall diff --git a/data/usr/bin/mlde-lead b/data/usr/bin/mlde-lead Binary files differindex 5e07fcd..b6b28ff 100755 --- a/data/usr/bin/mlde-lead +++ b/data/usr/bin/mlde-lead 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 |
