micetools/Makefile

68 lines
2.8 KiB
Makefile
Raw Normal View History

2022-10-30 17:33:02 +00:00
BUILD_DIR := build
DIST_DIR := dist
BUILD_DRIVE := M:
2023-02-10 04:48:25 +00:00
MICE := "$(BUILD_DIR)/src\mice.exe"
2022-10-30 17:33:02 +00:00
2023-02-10 04:50:07 +00:00
# VCVARS := "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat"
2022-10-30 17:33:02 +00:00
# For windows XP:
2023-02-10 04:50:07 +00:00
VCVARS := "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat" -vcvars_ver=14.16
2022-10-30 17:33:02 +00:00
.ONESHELL:
.PHONY: all
2023-02-10 04:48:25 +00:00
all: mice dist
2022-10-30 17:33:02 +00:00
2023-02-10 04:48:25 +00:00
mice:
2022-10-30 17:33:02 +00:00
-@subst $(BUILD_DRIVE) .
@cd /D $(BUILD_DRIVE) \
2023-02-10 04:50:07 +00:00
& $(VCVARS) \
2023-02-10 04:48:25 +00:00
& meson setup --cross cross-32.ini $(BUILD_DRIVE)\$(BUILD_DIR) \
& meson compile -C $(BUILD_DRIVE)\$(BUILD_DIR)
2022-10-30 17:33:02 +00:00
@subst $(BUILD_DRIVE) /D
.PHONY: clean
clean:
@del /S /F /Q $(BUILD_DIR)
@rmdir /S /Q $(BUILD_DIR)
@del /S /F /Q $(DIST_DIR)
@rmdir /S /Q $(DIST_DIR)
.PHONY: dist
dist:
@-mkdir $(DIST_DIR) > NUL 2>&1
@-mkdir $(DIST_DIR)\util > NUL 2>&1
2023-03-13 21:49:07 +00:00
@-mkdir $(DIST_DIR)\system_dummy > NUL 2>&1
2022-10-30 17:33:02 +00:00
@-mkdir $(DIST_DIR)\Execute > NUL 2>&1
@-mkdir $(DIST_DIR)\Execute\Z > NUL 2>&1
@-mkdir $(DIST_DIR)\Execute\S > NUL 2>&1
2023-02-10 04:48:25 +00:00
@copy /Y "$(BUILD_DIR)/src/micetools/micekeychip\micekeychip.exe" "$(DIST_DIR)/micekeychip.exe"
@copy /Y "$(BUILD_DIR)/src/micetools/micemaster\micemaster.exe" "$(DIST_DIR)/micemaster.exe"
@copy /Y "$(BUILD_DIR)/src/micetools/lib/libpcp\libpcp.lib" "$(DIST_DIR)/libpcp.lib"
@copy /Y "$(BUILD_DIR)/src/micetools/launcher\mice.exe" "$(DIST_DIR)/mice.exe"
# @copy /Y "$(BUILD_DIR)/src/micetools/launcher\mice.pdb" "$(DIST_DIR)/mice.pdb"
@copy /Y "$(BUILD_DIR)/src/micetools/dll\mice.pdb" "$(DIST_DIR)/mice.pdb"
@copy /Y "$(BUILD_DIR)/src/micetools/dll\mice.dll" "$(DIST_DIR)/mice.dll"
@copy /Y "$(BUILD_DIR)/src/micetools/miceboot\miceprestartup.exe" "$(DIST_DIR)/Execute/miceprestartup.exe"
@copy /Y "$(BUILD_DIR)/src/micetools/miceboot\micestartup.exe" "$(DIST_DIR)/Execute/micestartup.exe"
@copy /Y "$(BUILD_DIR)/src/micetools/miceboot\TrueCrypt.exe" "$(DIST_DIR)/Execute/TrueCrypt.exe"
@copy /Y "$(BUILD_DIR)/src/micetools/miceboot\mxmaster.exe" "$(DIST_DIR)/Execute/S/mxmaster.exe"
2023-04-10 17:29:59 +00:00
@copy /Y "$(BUILD_DIR)/src/micetools/util\*.exe" "$(DIST_DIR)/util/"
@copy /Y "$(BUILD_DIR)/src/micetools/util\*.pdb" "$(DIST_DIR)/util/"
2022-10-30 17:33:02 +00:00
2023-03-13 21:49:07 +00:00
@copy /Y "$(BUILD_DIR)/src/micetools/system_dummy\dummymaster\dummymaster.exe" "$(DIST_DIR)/system_dummy/dummymaster.exe"
@copy /Y "$(BUILD_DIR)/src/micetools/system_dummy\dummyinstaller\dummyinstaller.exe" "$(DIST_DIR)/system_dummy/dummyinstaller.exe"
2023-03-28 20:08:02 +00:00
@copy /Y "$(BUILD_DIR)/src/micetools/system_dummy\dummykeychip\dummykeychip.exe" "$(DIST_DIR)/system_dummy/dummykeychip.exe"
2023-03-13 21:49:07 +00:00
2022-10-30 17:33:02 +00:00
@copy /Y "src/micetools/miceboot\TrueCrypt.cmd" "$(DIST_DIR)/Execute/TrueCrypt.cmd"
@xcopy /E /H /C /R /Q /Y src\system "$(DIST_DIR)\system/*"
@xcopy /E /H /C /R /Q /Y src\tools "$(DIST_DIR)\tools/*"
@xcopy /E /H /C /R /Q /Y src\patches "$(DIST_DIR)\patches/*"