diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 51 |
1 files changed, 27 insertions, 24 deletions
@@ -1,37 +1,40 @@ -SYSTEM ?= vs2019 -CONFIG ?= Debug MAKEFLAGS += --no-print-directory +SHELL = sh + +SYSTEM ?= vs2019 +VS_CONFIG ?= Debug +VS_TOOLSET ?= v142 +VS_PLATFORM ?= x64 -EXE = b/$(SYSTEM)/EpisodeBrowser.exe -ifneq ($(SYSTEM), mingw) -EXE = b/$(SYSTEM)/Debug/EpisodeBrowser.exe +ifeq ($(SYSTEM), mingw) +DIR = $(DIR) +OUT = $(DIR) +else ifeq ($(SYSTEM), vs2019) +DIR = b/vs2019-$(VS_TOOLSET)-$(VS_PLATFORM) +OUT = $(DIR)/$(VS_CONFIG) +else +$(error SYSTEM=$(SYSTEM) is not supported) 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) + mkdir -p $(DIR) + cd $(DIR) && cmake -DCMAKE_CONFIGURATION_TYPES=$(VS_CONFIG) -G "Unix Makefiles" ../../c + cd $(DIR) && cmake --build . -j +else ifeq ($(SYSTEM), vs2019) + mkdir -p $(DIR) + cd $(DIR) && cmake -DCMAKE_CONFIGURATION_TYPES=$(VS_CONFIG) \ + -G "Visual Studio 16 2019" -T "$(VS_TOOLSET)" -A "$(VS_PLATFORM)" ../../c + cd $(DIR) && cmake --build . -j --config $(VS_CONFIG) + cp x/l/$(VS_PLATFORM)/libxml2.dll $(DIR)/$(VS_CONFIG) + cp $(OUT)/libxml2.dll "C:\Users\John\Desktop\Delat" + cp $(OUT)/libxml2.dll "C:\Users\John\Desktop\XP" endif - cp $(EXE) "C:\Users\John\Desktop\Delat" + cp $(OUT)/EpisodeBrowser.exe "C:\Users\John\Desktop\Delat" + cp $(OUT)/EpisodeBrowser.exe "C:\Users\John\Desktop\XP" 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 |