aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 9c63d2311179eb809b48a764a2b65d207ba13b97 (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
31
32
33
34
35
36
37
SYSTEM ?= vs2019
CONFIG ?= Debug
MAKEFLAGS += --no-print-directory

EXE = b/$(SYSTEM)/EpisodeBrowser.exe
ifneq ($(SYSTEM), mingw)
EXE = b/$(SYSTEM)/Debug/EpisodeBrowser.exe
endif

all:
ifeq ($(SYSTEM), mingw)
	cd b/$(SYSTEM) && cmake -DCMAKE_CONFIGURATION_TYPES=$(CONFIG) -G "Unix Makefiles" ../../c
	cd b/$(SYSTEM) && cmake --build . -j
else
	cd b/$(SYSTEM) && cmake -DCMAKE_CONFIGURATION_TYPES=$(CONFIG) -G "Visual Studio 16 2019" ../../c
	cd b/$(SYSTEM) && cmake --build . -j --config $(CONFIG)
	cp x/l/libxml2.dll b/$(SYSTEM)/$(CONFIG)
endif
	cp $(EXE) "C:\Users\John\Desktop\Delat"

clean:
	cd b/$(SYSTEM) && cmake --build . --target clean

TAGS: c/*.cpp c/*.h
	etags --declarations -lc++ c/*.cpp c/*.h

.PHONY: mingw vs2019
b:
	mkdir b
b/mingw: b
	mkdir b/mingw
b/vs2019: b
	mkdir b/vs2019
mingw: b/mingw
	cd b/mingw && cmake -G "Unix Makefiles" ../../c
vs2019: b/vs2019
	cd b/vs2019 && cmake -G "Visual Studio 16 2019" ../../c