Improved the new test app's linux build script and created them for other platforms.

This commit is contained in:
Relintai 2024-01-18 22:56:42 +01:00
parent 835144d6f3
commit 76e53cebac
4 changed files with 47 additions and 6 deletions

View File

@ -2,12 +2,8 @@ cp -u ../out/full/sfw.h sfw.h
cp -u ../out/full/sfw.cpp sfw.cpp
cp -u ../out/full/sfw_3rd.m sfw_3rd.m
ccache g++ -Wall -g -c sfw.cpp -o sfw.o
ccache g++ -Wall -g -c game_scene.cpp -o game_scene.o
ccache g++ -Wall -g -c main.cpp -o main.o
#-static-libgcc -static-libstdc++
ccache g++ -Wall -g -c game_scene.cpp -o game_scene.o
ccache g++ -Wall -g -c main.cpp -o main.o
ccache g++ -Wall -lX11 -static-libgcc -static-libstdc++ -g sfw.o game_scene.o main.o -o game

View File

@ -0,0 +1,17 @@
cp -u ../out/full/sfw.h sfw.h
cp -u ../out/full/sfw.cpp sfw.cpp
cp -u ../out/full/sfw_3rd.m sfw_3rd.m
export SDKROOT=$(xcrun --show-sdk-path)
export args="-std=c++14 -w -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox "
clang++ $args -g -c sfw.cpp -o sfw.o
clang++ -w -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox -g -c sfw_3rd.m -o sfw_3rd.o
clang++ $args -g -c game_scene.cpp -o game_scene.o
clang++ $args -g -c main.cpp -o main.o
# You might need to add -lpthread and/or -latomic depending on your compiler version
clang++ $args -g sfw.o sfw_3rd.o game_scene.o main.o -o game

View File

@ -0,0 +1,15 @@
@echo off
if not defined DevEnvDir (
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
)
rem debug: /Zi (== -g)
cl /EHsc /Zi /c sfw.cpp /Fo:sfw.obj
cl /EHsc /Zi /c game_scene.cpp /Fo:game_scene.obj
cl /EHsc /Zi /c main.cpp /Fo:main.obj
cl /Zi /EHsc /Fegame-vc.exe ^
sfw.obj game_scene.obj main.obj ^
/SUBSYSTEM:CONSOLE

View File

@ -0,0 +1,13 @@
cp -u ../out/full/sfw.h sfw.h
cp -u ../out/full/sfw.cpp sfw.cpp
cp -u ../out/full/sfw_3rd.m sfw_3rd.m
ccache g++ -Wall -g -c sfw.cpp -o sfw.o
ccache g++ -Wall -g -c game_scene.cpp -o game_scene.o
ccache g++ -Wall -g -c main.cpp -o main.o
# You might need to add -lpthread and/or -latomic depending on your compiler version
ccache g++ -Wall -g sfw.o game_scene.o main.o \
-lgdi32 -lShlwapi -lws2_32 \
-o game