~vladh/peony

peony/make_macos.mk -rw-r--r-- 1.1 KiB
9377cf56Vlad-Stefan Harbuz Add Linux build system 6 months ago
                                                                                
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
# Peony Game Engine
# Copyright (C) 2020 Vlad-Stefan Harbuz <vlad@vladh.net>
# All rights reserved.

COMPILER_FLAGS = \
	-I/usr/local/opt/glm/include \
	-I/usr/local/opt/glfw/include \
	-I/usr/local/opt/assimp/include \
	-I/usr/local/opt/freetype/include/freetype2 \
	-D_FORTIFY_SOURCE=2 -ggdb3 -Og -Wall -Werror -Wextra -pedantic \
	-std=c++2a \
	-Wno-deprecated-volatile -Wno-unused-function -Wno-unknown-pragmas -Wno-comment \
	-Wno-unused-parameter -Wno-sign-compare

LINKER_FLAGS = \
	-L/usr/local/opt/glfw/lib \
	-L/usr/local/opt/assimp/lib \
	-L/usr/local/opt/freetype/lib \
	-lfreetype -lglfw -lassimp -lm

.PHONY: unity unity-bundle run

unity-bundle: unity
	mkdir -p bin/peony.app/Contents/MacOS
	cp bin/peony bin/peony.app/Contents/MacOS/
	cp extra/Info.plist bin/peony.app/Contents/

unity:
	@echo "################################################################################"
	@echo "### Building"
	@echo "################################################################################"
	time g++ $(COMPILER_FLAGS) $(LINKER_FLAGS) src/_unity.cpp -o bin/peony

run:
	@./bin/peony.app/Contents/MacOS/peony