Reorganization

This commit is contained in:
Krzosa Karol
2024-01-12 10:10:09 +01:00
parent f68500a804
commit dde2334f95
34 changed files with 31 additions and 31 deletions

View File

@@ -5,13 +5,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: sudo apt install g++
- run: g++ tools/build_main.cpp -o bld && ./bld
- run: g++ build_tool/build_main.cpp -o bld && ./bld
run-and-compile-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: brew install llvm
- run: clang++ tools/build_main.cpp -std=c++11 -o bld && ./bld
- run: clang++ build_tool/build_main.cpp -std=c++11 -o bld && ./bld
run-and-compile-windows:
runs-on: windows-latest
steps:

View File

@@ -3,6 +3,6 @@ call ../misc/compile_setup.bat
mkdir build
cd build
cl -Fe:bld.exe ../tools/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS
cl -Fe:bld.exe ../build_tool/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS
cd ..
build\bld.exe

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
gcc -o bld tools/build_main.cpp -g
gcc -o bld build_tool/build_main.cpp -g
./bld

View File

@@ -1,4 +1,4 @@
#include "tools/build_lib.cpp"
#include "build_tool/build_lib.cpp"
void CompileFiles(Strs cc, Strs files);
int ReturnValue = 0;

View File

@@ -41,7 +41,7 @@ DEBUG = -fsanitize=address
#define CL_VSNPRINTF stbsp_vsnprintf
#define CL_SNPRINTF stbsp_snprintf
#define AND_CL_STRING_TERMINATE_ON_NEW_LINE
#include "../code/clexer.c"
#include "../standalone_modules/clexer.c"
#define SRC_CACHE_ENTRY_COUNT 1024
struct SRC_CacheEntry {

20
core.c
View File

@@ -1,22 +1,22 @@
#include "core.h"
#define STB_SPRINTF_IMPLEMENTATION
#include "code/stb_sprintf.h"
#include "standalone_modules/stb_sprintf.h"
#define IO_VSNPRINTF stbsp_vsnprintf
#define IO_SNPRINTF stbsp_snprintf
#include "code/io.c"
#include "standalone_modules/io.c"
#define MA_ASSERT(x) IO_Assert(x)
#include "code/arena.c"
#include "standalone_modules/arena.c"
#define RE_ASSERT(x) IO_Assert(x)
#include "code/regex.c"
#include "code/unicode.c"
#include "standalone_modules/regex.c"
#include "standalone_modules/unicode.c"
#define S8_VSNPRINTF stbsp_vsnprintf
#define S8_ALLOCATE(allocator, size) MA_PushSize(allocator, size)
#define S8_ASSERT(x) IO_Assert(x)
#define S8_MemoryCopy MA_MemoryCopy
#include "code/string.c"
#include "standalone_modules/string.c"
#define MU_ASSERT IO_Assert
#include "code/multimedia.h"
#include "code/hash.c"
#include "code/load_library.c"
#include "code/filesystem.c"
#include "standalone_modules/multimedia.h"
#include "standalone_modules/hash.c"
#include "standalone_modules/load_library.c"
#include "filesystem/filesystem.c"

30
core.h
View File

@@ -1,31 +1,31 @@
#pragma once
#include "code/preproc_env.h"
#include "code/stb_sprintf.h"
#include "code/io.h"
#include "code/arena.h"
#include "code/string.h"
#include "code/unicode.h"
#include "code/hash.h"
#include "code/linked_list.h"
#include "code/regex.h"
#include "code/multimedia.h"
#include "code/load_library.h"
#include "code/filesystem.h"
#include "standalone_modules/preproc_env.h"
#include "standalone_modules/stb_sprintf.h"
#include "standalone_modules/io.h"
#include "standalone_modules/arena.h"
#include "standalone_modules/string.h"
#include "standalone_modules/unicode.h"
#include "standalone_modules/hash.h"
#include "standalone_modules/linked_list.h"
#include "standalone_modules/regex.h"
#include "standalone_modules/multimedia.h"
#include "standalone_modules/load_library.h"
#include "filesystem/filesystem.h"
#ifdef __cplusplus
#include "code/defer.hpp"
#include "standalone_modules/defer.hpp"
#define TABLE_ASSERT IO_Assert
#define TABLE_Allocator M_Allocator
#define TABLE_ALLOCATE(allocator, size) M_Alloc(allocator, size)
#define TABLE_DEALLOCATE(allocator, p) M_Dealloc(allocator, p)
#define TABLE_SET_DEFAULT_ALLOCATOR \
if (!allocator.p) allocator = M_GetSystemAllocator();
#include "code/table.hpp"
#include "standalone_modules/table.hpp"
#define ARRAY_ASSERT IO_Assert
#define ARRAY_Allocator M_Allocator
#define ARRAY_REALLOCATE(allocator, p, size, old_size) M_ReallocNonZeroed(allocator, p, size, old_size)
#define ARRAY_DEALLOCATE(allocator, p) M_Dealloc(allocator, p)
#define ARRAY_SET_DEFAULT_ALLOCATOR \
if (!allocator.p) allocator = M_GetSystemAllocator();
#include "code/array.hpp"
#include "standalone_modules/array.hpp"
#endif