add static linking

This commit is contained in:
2025-09-23 18:39:29 +02:00
parent 997343e4ae
commit 0a5029db2c
15 changed files with 31 additions and 11 deletions

View File

@@ -1,9 +0,0 @@
#!/bin/sh
echo Building with ...
echo gcc src/main.c -o res/main $(pkg-config --cflags --libs sdl3 x11 xfixes sdl3-image)
gcc src/main.c src/neko.c -I src/ -o res/main $(pkg-config --cflags --libs sdl3 x11 xfixes sdl3-image) -lm
echo Running...
#DISPLAY=:1 ./res/main
./res/main

5
manager/build_manager.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
echo Building manager with ...
echo gcc manager.c -o manager
gcc manager.c -o manager

5
manager/manager.c Normal file
View File

@@ -0,0 +1,5 @@
void main(void){
}

19
overlay/build.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
echo Building with ...
echo gcc src/main.c -o res/main $(pkg-config --cflags --libs sdl3 x11 xfixes sdl3-image)
gcc src/main.c src/neko.c -I src/ -o res/main $(pkg-config --static --cflags --libs sdl3 x11 xfixes sdl3-image) -lm
echo Building static version
echo gcc src/main.c src/neko.c -I src/ -o res/main
echo $(pkg-config --cflags sdl3 x11 xfixes sdl3-image)
echo -Wl,-Bstatic -lSDL3 -lSDL3_image -Wl,-Bdynamic
echo -lX11 -lXfixes -lm
gcc src/main.c src/neko.c -I src/ -o res/main \
$(pkg-config --cflags sdl3 x11 xfixes sdl3-image) \
-Wl,-Bstatic -lSDL3 -lSDL3_image -Wl,-Bdynamic \
-lX11 -lXfixes -lm
echo Running...
#DISPLAY=:1 ./res/main
./res/main

BIN
overlay/res/main Executable file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 799 KiB

After

Width:  |  Height:  |  Size: 799 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 838 KiB

After

Width:  |  Height:  |  Size: 838 KiB

View File

@@ -81,8 +81,8 @@ void neko_render(SDL_Renderer *renderer, SDL_Window *window){
dst_rect.x = catx; dst_rect.x = catx;
dst_rect.y = caty; dst_rect.y = caty;
dst_rect.h = WINDOW_HEIGHT/15; dst_rect.h = WINDOW_HEIGHT/20;
dst_rect.w = WINDOW_HEIGHT/15; dst_rect.w = WINDOW_HEIGHT/20;
int texture_index = 0; int texture_index = 0;
switch (cat_state) switch (cat_state)

BIN
res/main

Binary file not shown.