This repository was archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
35 lines (29 loc) · 1.36 KB
/
Copy pathbuild.bat
File metadata and controls
35 lines (29 loc) · 1.36 KB
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
@echo off
set exe_name=appWin32
set build_options= /DBUILD_WIN32=1
set compile_flags= /nologo /Oi /Gm- /GR- /EHa- /Zi /FC /GS- /Gs9999999 /I ../src/
set link_flags= /opt:ref /incremental:no /NODEFAULTLIB /subsystem:windows /STACK:0x100000,0x100000 kernel32.lib user32.lib gdi32.lib
if not exist build mkdir build
pushd build
cl %build_options% %compile_flags% ../src/app.c /link %link_flags% /out:%exe_name%.exe
copy ..\data\* . >NUL
popd
:: ╔════════════════╗
:: ║ Compiler Flags ║
:: ╚════════════════╝
:: Oi Generates intrinsic functions.
:: O2 Creates fast code.
:: Gm- Disables minimal recompilation.
:: GR- Disables run-time type information (RTTI).
:: EHa- Disables exception handling.
:: Zi Generates complete debugging information.
:: FC Display full path of source code files passed to cl.exe in diagnostic text.
:: Fd:<file> Renames program database file.
:: Fe:<file.exe> Renames the executable file.
:: Fo:<file> Creates an object file.
:: Fm:<file> Creates a mapfile.
:: D <name> Defines constants and macros.
:: I <dir> Searches a directory for include files.
:: ╔══════════════╗
:: ║ Linker Flags ║
:: ╚══════════════╝