-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
47 lines (43 loc) · 1.09 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
SYS := $(shell gcc -dumpmachine)
ifneq (, $(findstring linux, $(SYS)))
OS = LINUX
else ifneq (, $(findstring darwin, $(SYS)))
OS = DARWIN
else
# Remaining should be all Windows (cygwin & mingw)
OS = WINDOWS
VS_VERSION := $(shell read -p "Enter your version of visual studio (i.e. 2008, 2010, 2012): " VS_VER_INPUT;\
echo "$$VS_VER_INPUT";)
endif
all: get-deps build
.PHONY: all
get-deps:
git submodule update --init
git submodule update --recursive
.PHONY: get-deps
build:
@echo "Preparing build for $(OS)"
ifeq ($(OS), WINDOWS)
cmd \/c .\\firebreath\\prep$(VS_VERSION).cmd\ webpgPlugin\ build
else ifeq ($(OS), DARWIN)
./firebreath/prepmac.sh webpgPlugin build
else
./firebreath/prepmake.sh webpgPlugin build
endif
ifeq ($(OS), WINDOWS)
cmake --build build --config MinSizeRel
else ifeq ($(OS), DARWIN)
cmake --build build --target webpg --config MinSizeRel
else
cmake --build build --target webpg --config MinSizeRel -- --no-print-directory
endif
.PHONY: build
clean:
ifeq ($(OS), WINDOWS)
rmdir /S /Q build
rmdir /S /Q CMakeFiles
else
rm -rf ./build
rm -rf ./CMakeFiles
endif
.PHONY: clean