progress on compiling within wsl linux

This commit is contained in:
2025-01-13 20:13:01 -05:00
parent 8f9cff4119
commit 4abb591e1c
4 changed files with 12 additions and 9 deletions

View File

@@ -84,7 +84,7 @@ popd > /dev/null
path_stb_truetype="$path_thirdparty/stb/src"
pushd "$path_stb_truetype" > /dev/null
eval make -C "$path_stb_truetype"
make
popd > /dev/null
source "$(dirname "$0")/helpers/odin_compiler_defs.sh"

BIN
thirdparty/stb/lib/stb_truetype.a vendored Normal file

Binary file not shown.

View File

@@ -6,6 +6,8 @@ else
all: unix
endif
$(info Current OS is: $(OS))
wasm:
mkdir -p ../lib
$(CC) -c -Os --target=wasm32 --sysroot=$(shell odin root)/vendor/libc stb_truetype.c -o ../lib/stb_truetype_wasm.o
@@ -13,15 +15,13 @@ wasm:
unix:
mkdir -p ../lib
$(CC) -c -O2 -Os -fPIC stb_truetype.c
$(AR) rcs ../lib/stb_truetype.a stb_truetype.o
#$(CC) -fPIC -shared -Wl,-soname=stb_truetype.so -o ../lib/stb_truetype.so stb_image_truetype.o
$(AR) rcs ../lib/stb_truetype.a stb_truetype.o
#$(CC) -fPIC -shared -Wl,-soname=stb_truetype.so -o ../lib/stb_truetype.so stb_image_truetype.o
rm *.o
darwin:
mkdir -p ../lib
lipo -create stb_truetype-x86_64.o stb_truetype-arm64.o -output ../lib/darwin/stb_truetype.a
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_truetype.c -o stb_truetype-x86_64.o -mmacosx-version-min=10.12
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_truetype.c -o stb_truetype-arm64.o -mmacosx-version-min=10.12
lipo -create stb_truetype-x86_64.o stb_truetype-arm64.o -output ../lib/darwin/stb_truetype.a
rm *.o

View File

@@ -537,6 +537,8 @@ typedef i32 b32; // NOTE(bill): Prefer this!!!
#else
#define gb_inline __forceinline
#endif
#elif (__GNUC__)
#define gb_inline inline
#else
#define gb_inline __attribute__ ((__always_inline__))
#endif
@@ -964,11 +966,12 @@ gb_mutex_init(&m);
#endif
typedef struct gbThread gbThread;
#define GB_THREAD_PROC(name) isize name(struct gbThread *thread)
#define GB_THREAD_PROC(name) isize name(gbThread *thread)
typedef GB_THREAD_PROC(gbThreadProc);
typedef struct gbThread {
struct gbThread {
#if defined(GB_SYSTEM_WINDOWS)
void * win32_handle;
#else
@@ -983,7 +986,7 @@ typedef struct gbThread {
gbSemaphore semaphore;
isize stack_size;
b32 volatile is_running;
} gbThread;
};
GB_DEF void gb_thread_init (gbThread *t);
GB_DEF void gb_thread_destroy (gbThread *t);