GP-0 revised FileSystems lzfse build and C source placement within

module
This commit is contained in:
ghidra1 2024-03-29 15:03:40 -04:00
parent fa0cb8d881
commit 2a7897c366
17 changed files with 33 additions and 2 deletions

View file

@ -246,7 +246,6 @@ model {
b.cCompiler.args "/Oy" // Omit frame pointer b.cCompiler.args "/Oy" // Omit frame pointer
b.cCompiler.define "_CRT_SECURE_NO_DEPRECATE" b.cCompiler.define "_CRT_SECURE_NO_DEPRECATE"
b.cCompiler.define "_CRT_NONSTDC_NO_DEPRECATE" b.cCompiler.define "_CRT_NONSTDC_NO_DEPRECATE"
b.cCompiler.define "WIN64"
b.cCompiler.define "ZLIB_WINAPI" b.cCompiler.define "ZLIB_WINAPI"
} }
else if (b.toolChain in Clang) { else if (b.toolChain in Clang) {

View file

@ -39,7 +39,7 @@ model {
sources { sources {
c { c {
source { source {
srcDir "src/lzfse" srcDir "src/lzfse/c"
include "lzfse_encode.c" include "lzfse_encode.c"
include "lzfse_decode.c" include "lzfse_decode.c"
include "lzfse_encode_base.c" include "lzfse_encode_base.c"
@ -53,4 +53,36 @@ model {
} }
} }
} }
binaries {
all{ b ->
if (b.toolChain in Gcc) {
b.cCompiler.args "-std=c99"
b.cCompiler.args "-Wall"
b.cCompiler.args "-O2"
if (b.targetPlatform.operatingSystem.linux) {
b.cCompiler.define "LINUX"
b.cCompiler.define "_LINUX"
}
}
else if (b.toolChain in VisualCpp) {
if (b.targetPlatform.operatingSystem.windows) {
b.cCompiler.define "WINDOWS"
b.cCompiler.define "_WINDOWS"
b.cCompiler.define "WIN32"
b.cCompiler.define "_WIN32"
if (b.targetPlatform.name == "win_x86_64") {
b.cCompiler.define "WIN64"
b.cCompiler.define "_WIN64"
}
}
b.cCompiler.args "/O2"
}
else if (b.toolChain in Clang) {
b.cCompiler.args "-std=c99"
b.cCompiler.args "-Wall"
b.cCompiler.args "-O2"
}
}
}
} }