mr4th-dynamic-linking/win32_load_time/build.bat

29 lines
786 B
Batchfile
Raw Normal View History

2024-04-23 18:50:47 +00:00
@echo off
2024-04-23 19:50:20 +00:00
REM: Path setup
2024-04-23 18:50:47 +00:00
2024-04-23 19:50:20 +00:00
SET src=%cd%
2024-04-23 18:50:47 +00:00
cd ..
if not exist "build\" mkdir build
cd build
2024-04-23 19:50:20 +00:00
REM: ### THE ARRANGEMENT OF THIS BUILD ###
2024-04-23 18:50:47 +00:00
REM: The "base layer" must be built and shared by all dynamic components.
REM: In this example the the base layer is linked via load-time linking with the other modules.
REM: The "plugin" is loaded at run-time.
REM: Build the base layer as a .dll (also produces load-time linking data in win32_base.lib)
cl /nologo /Zi /LD %src%\win32_base.c
REM: Build the executable; provide the base layer's load-time linking data via win32_base.lib
cl /nologo /Zi %src%\win32_main.c win32_base.lib
REM: Build the plugin as a .dll; provide the base layer's load-time linking data via win32_base.lib
cl /nologo /Zi /LD %src%\win32_plugin.c win32_base.lib