-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (52 loc) · 1.87 KB
/
Makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Project: ICP Projekt 2023/2024
# Author: Tomáš Hobza (xhobza03), Jakub Všetečka (xvsete00)
# Description: Makefile for building and running the ICP Projekt using CMake and Qt.
# Set the project directory
PROJECT_DIR := $(shell pwd)
# Set the build directory
BUILD_DIR := $(PROJECT_DIR)/build
# Default target
all: build
# For using Qt version 5.5.1 add MERLIN=1 to the make command
PREFIX_PATH=
RUN_EXPORTS=
ifdef MERLIN
RUN_EXPORTS=@export LD_LIBRARY_PATH=/usr/local/share/Qt-5.5.1/5.5/gcc_64/lib; export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/share/Qt-5.5.1/5.5/gcc_64/plugins/platforms;
PREFIX_PATH=-D CMAKE_PREFIX_PATH='/usr/local/share/Qt-5.5.1/5.5/gcc_64' executable
endif
# Because macOS uses clang as the default compiler, we need to specify g++ as the compiler
CXX_COMPILER=g++
ifeq ($(shell uname),Darwin)
CXX_COMPILER=/usr/bin/g++
endif
# Configure the project
configure:
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR) && cmake -D CMAKE_CXX_COMPILER=$(CXX_COMPILER) $(PREFIX_PATH) $(PROJECT_DIR)
# Build the project
build: configure
@cd $(BUILD_DIR) && make
# Run the application
# /usr/local/share/Qt-5.5.1/5.5/gcc_64/plugins/platforms
run: build
$(RUN_EXPORTS) $(BUILD_DIR)/icp-projekt
# @$(BUILD_DIR)/icp-projekt
# Clean the build directory
clean:
@rm -rf $(BUILD_DIR)
doxygen: clean-doc
@doxygen Doxyfile
@cd ./doc/latex && make
# @pdflatex -output-directory=./doc ./doc/latex/refman.tex
@mv ./doc/latex/refman.pdf ./doc/documentation.pdf
puml:
@plantuml -tsvg ./doc/diagrams/*.puml
@pandoc ./doc/draft.md -o draft.pdf
clean-doc:
@rm -rf ./doc/latex
@rm -rf ./doc/documentation.pdf
zip:
@rm -f xhobza03-xvsete00.zip
@zip -r xhobza03-xvsete00.zip ./src/* ./headers/* ./examples/* ./doc/* ./CMakeLists.txt ./Doxyfile ./Makefile ./README.md ./README.txt ./conceptual_draft.pdf -x *.mp4
# Phony targets to handle commands as prerequisites
.PHONY: configure build run clean