aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--lead.pro29
-rw-r--r--makefile53
3 files changed, 31 insertions, 53 deletions
diff --git a/.gitignore b/.gitignore
index 90cc9cf..d617183 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
.vscode
build/*
data
+.qmake.stash
+Makefile
diff --git a/lead.pro b/lead.pro
new file mode 100644
index 0000000..ed02111
--- /dev/null
+++ b/lead.pro
@@ -0,0 +1,29 @@
+TEMPLATE = app
+TARGET = lead
+INCLUDEPATH += .
+
+QT += widgets
+
+# Output folders, thanks https://stackoverflow.com/a/12872585/12036073
+release: DESTDIR = build/release
+debug: DESTDIR = build/debug
+
+OBJECTS_DIR = $$DESTDIR/.obj
+MOC_DIR = $$DESTDIR/.moc
+RCC_DIR = $$DESTDIR/.qrc
+UI_DIR = $$DESTDIR/.ui
+
+# Make commands, thanks https://stackoverflow.com/a/9378280/12036073
+target.path = /usr/bin/lead
+INSTALLS += target
+
+# Input
+HEADERS += src/app.h src/screenname.h src/sensor.h
+SOURCES += src/app.cpp src/main.cpp src/screenname.cpp src/sensor.cpp
+
+# You can make your code fail to compile if you use deprecated APIs.
+# In order to do so, uncomment the following line.
+# Please consult the documentation of the deprecated API in order to know
+# how to port your code away from it.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
diff --git a/makefile b/makefile
deleted file mode 100644
index 78a4df5..0000000
--- a/makefile
+++ /dev/null
@@ -1,53 +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
-COMPILER = clang -std=c++11 -Wall -O3 -fPIC -MMD $(INCLUDES) -c $< -o $@
-MOC = moc $(INCLUDES) -o $@ $<
-LINKER = g++ -o $@ $^ -lQt5Xdg -lQt5Widgets -lQt5Gui -lQt5Core
-MKDIR = mkdir -p $(dir $@)
-
-
-# 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/lead: build/main.o build/app.o build/sensor.o build/screenname.o build/moc_app.o build/moc_sensor.o build/moc_screenname.o
- $(MKDIR)
- $(LINKER)
-
-build/%.o: src/%.cpp
- $(MKDIR)
- $(COMPILER)
-
-build/moc_%.o: build/moc_%.cpp
- $(MKDIR)
- $(COMPILER)
-
-build/moc_%.cpp: src/%.h
- $(MKDIR)
- $(MOC)
-
--include build/*.d
-
-
-###### CLEAN ######
-
-clean:
- rm -f build/*
- rm -f data/usr/bin/lead
-
-
-###### INSTALL ######
-
-install:
- cp -r data/* /
-
-
-###### UNINSTALL ######
-
-uninstall:
- rm -f /usr/bin/lead
-
-
-.PHONY: clean install uninstall \ No newline at end of file