mirror of
https://github.com/Relintai/sfw.git
synced 2024-12-20 21:06:49 +01:00
Improved the new test app's linux build script and created them for other platforms.
This commit is contained in:
parent
835144d6f3
commit
76e53cebac
@ -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
|
||||
|
||||
|
17
tools/merger/test_app/compile_osx.sh
Executable file
17
tools/merger/test_app/compile_osx.sh
Executable 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
|
15
tools/merger/test_app/compile_vs.bat
Normal file
15
tools/merger/test_app/compile_vs.bat
Normal 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
|
13
tools/merger/test_app/compile_windows.sh
Executable file
13
tools/merger/test_app/compile_windows.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user