aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-01-12 17:54:07 +0100
committerNao Pross <naopross@thearcway.org>2018-01-12 17:54:07 +0100
commit31f816b10f984de0b2232134c2ab7707907f1190 (patch)
tree505f24c10a1e4555800e186966bb24c9456a1993
parentUpdate README (diff)
downloadOrbitingYeti-31f816b10f984de0b2232134c2ab7707907f1190.tar.gz
OrbitingYeti-31f816b10f984de0b2232134c2ab7707907f1190.zip
Add makefile and remove cmake stuff from gitignore
Note: the makefile just creates a build directory and invokes qmake
-rw-r--r--.gitignore12
-rw-r--r--Makefile30
2 files changed, 30 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 223a919..307f640 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,15 +35,3 @@ OrbitingYeti
OrbitingYeti.exe
build
-
-# cmake
-**/makefile
-**/Makefile
-**/CMakeFiles
-**/CmakeScripts
-**/CMakeCache.txt
-**/Testing
-**/install_manifest.txt
-**/cmake_install.cmake
-**/compile_commands.json
-**/CTestTestfile.cmake
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..125e667
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+# Default qmake
+QMAKE=$(shell command -v qmake)
+
+# On Fedora and other systems the binary has a different name
+# QT5 is preferred
+ifeq "$(QMAKE)" ""
+ QMAKE=$(shell command -v qmake-qt5)
+endif
+
+# QT4
+ifeq "$(QMAKE)" ""
+ QMAKE=$(shell command -v qmake-qt4)
+endif
+
+
+# Build directory
+BUILD_DIR=build
+
+.ONESHELL:
+all:
+ifeq "$(QMAKE)" ""
+ $(error "qmake is not installed")
+else
+ echo "found qmake: $(QMAKE)"
+endif
+
+ mkdir -p $(BUILD_DIR)
+ cd $(BUILD_DIR)
+ $(QMAKE) -makefile ..
+ $(MAKE) clean all