aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 125e6671cd192729b8a35764a62a8c089add454a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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