aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorna <noah.andreas@nukura.com>2017-01-24 11:18:01 +0100
committerna <noah.andreas@nukura.com>2017-01-24 11:18:01 +0100
commit61ed09c934e66fd069eef7b07289c7de751d4edf (patch)
tree4d07e17dbbaa3d708ddd6122b5b30f046a01fe58
parentc3344a23596cfa29d16493a24e57c39bb3b44889 (diff)
downloadlead-61ed09c934e66fd069eef7b07289c7de751d4edf.tar
lead-61ed09c934e66fd069eef7b07289c7de751d4edf.tar.gz
lead-61ed09c934e66fd069eef7b07289c7de751d4edf.zip
changed ninja to makefile
-rw-r--r--.gitignore3
-rw-r--r--CHANGELOG.md3
-rw-r--r--README.md8
-rw-r--r--build.ninja46
-rwxr-xr-xdata/usr/bin/mlde-leadbin45056 -> 45056 bytes
-rw-r--r--makefile48
6 files changed, 56 insertions, 52 deletions
diff --git a/.gitignore b/.gitignore
index ffb39e7..ab24a97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/README.md b/README.md
index fe85c03..5bcd1f9 100644
--- a/README.md
+++ b/README.md
@@ -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
index 5e07fcd..b6b28ff 100755
--- a/data/usr/bin/mlde-lead
+++ b/data/usr/bin/mlde-lead
Binary files differ
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