Adjusted build staging so that engine post-build codgen wont occur when process is running

+ some refactoring as what I was doing didn't correlate to platform so I associate it with the engine module proper now.
This commit is contained in:
2023-09-28 21:21:05 -04:00
parent 2f6e60d472
commit a52f6efbff
7 changed files with 19 additions and 24 deletions

View File

@ -6,7 +6,7 @@
#include "dependencies/gen.hpp"
using namespace gen;
#include "platform/platform_engine_api.hpp"
#include "engine/engine_to_platform_api.hpp"
constexpr StrC fname_handmade_engine_symbols = txt("handmade_engine.symbols");
String get_symbol_from_module_table( FileContents symbol_table, u32 symbol_ID )
@ -53,7 +53,7 @@ String get_symbol_from_module_table( FileContents symbol_table, u32 symbol_ID )
int gen_main()
{
gen::init();
log_fmt("Generating code for Handmade Hero: Platfom Module\n");
log_fmt("Generating code for Handmade Hero: Engine Module\n");
FileContents symbol_table = file_read_contents( GlobalAllocator, true, fname_handmade_engine_symbols );
@ -61,7 +61,7 @@ int gen_main()
#undef str_ascii
Builder builder = Builder::open( "engine_symbol_table.hpp" );
builder.print( pragma_once );
builder.print( def_include( txt("platform/platform.hpp") ) );
builder.print( def_include( txt("engine/engine.hpp") ) );
builder.print( fmt_newline );
builder.print_fmt( "NS_ENGINE_BEGIN\n\n" );
@ -93,9 +93,8 @@ int gen_main()
builder.write();
#pragma pop_macro("str_ascii")
log_fmt("Generaton finished for Handmade Hero: Platform Module\n");
log_fmt("Generaton finished for Handmade Hero: Engine Module\n");
// gen::deinit();
return 0;
}
#endif

View File

@ -3,19 +3,15 @@
#define GEN_IMPLEMENTATION
#define GEN_BENCHMARK
#define GEN_ENFORCE_STRONG_CODE_TYPES
#include "gen.hpp"
#include "dependencies/gen.hpp"
using namespace gen;
int gen_main()
{
gen::init();
log_fmt("Generating code for Handmade Hero: Engine Module\n");
log_fmt("Generaton finished for Handmade Hero: Engine Module\n");
log_fmt("Generating code for Handmade Hero: Platform Module\n");
log_fmt("Generaton finished for Handmade Hero: Platform Module\n");
// gen::deinit();
return 0;
}
#endif

View File

@ -1,6 +1,6 @@
//#include "win32.h"
#include "engine.hpp"
#include "platform/platform_engine_api.hpp"
#include "engine_to_platform_api.hpp"
#include "handmade.hpp"
NS_ENGINE_BEGIN

View File

@ -1,5 +1,5 @@
#pragma once
#include "platform/platform.hpp"
#include "engine/engine.hpp"
NS_ENGINE_BEGIN

View File

@ -24,7 +24,7 @@
// Engine layer headers
#include "engine/engine.hpp"
#include "platform_engine_api.hpp"
#include "engine/engine_to_platform_api.hpp"
#include "gen/engine_symbol_table.hpp"