From 66290530a3f18e50e6f973cc135d02e33b915d5e Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Mon, 18 Sep 2023 20:53:15 -0400 Subject: [PATCH] Simplify --- generate.jai | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/generate.jai b/generate.jai index 42fde88..e7e74ae 100644 --- a/generate.jai +++ b/generate.jai @@ -11,10 +11,7 @@ AT_COMPILE_TIME :: true; COMPILE :: true; // Enable to compile the dr_libs library from source before generating bindings. COMPILE_DEBUG :: false; // Compile a debug or release version of dr_libs -MAKE_STATIC_LIB :: true; -MAKE_DYNAMIC_LIB :: false; - -#assert (MAKE_STATIC_LIB || MAKE_DYNAMIC_LIB) && !(MAKE_STATIC_LIB && MAKE_DYNAMIC_LIB); +MAKE_DYNAMIC_LIB :: false; // Will make a static lib when false. SOURCE_PATH :: "source"; @@ -116,6 +113,15 @@ generate_bindings :: () -> bool { array_add(*extra_clang_arguments, "-x", "c++", "-DWIN32_LEAN_AND_MEAN"); + #if MAKE_DYNAMIC_LIB { + libs := type_info(Libs); + for libs.names { + if LIBS_TO_BUILD & (xx libs.values[it_index]) { + array_add(*extra_clang_arguments, tprint("/DDR%_DLL", it)); + } + } + } + log_stripped_declarations = false; // Set to true if things aren't working... generate_compile_time_struct_checks = true; }