MAKEFLAGS += --no-print-directory SHELL = sh SYSTEM ?= vs2019 VS_CONFIG ?= Debug VS_TOOLSET ?= v142 VS_PLATFORM ?= x64 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) 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 $(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