Skip to content

Commit

Permalink
kasjödfkl
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank-py committed Dec 9, 2023
1 parent d36bef2 commit 0ba9987
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 9 deletions.
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,32 @@ ifeq ($(OS),Windows_NT)
else
clang++ -g -c src/*.cpp -I include -std=c++17 -Wall -m64 && clang++ *.o -g -o bin/debug/main -L -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf && ./bin/debug/main && rm *.o
endif


g:
ifeq ($(OS),Windows_NT)
g++ -g -c src/*.cpp -I include --std=c++17 -Wall -m64 && g++ *.o -g -o bin/debug/main -L -lmingw32 -lSDL2 -lSDL2_image -lSDL2_ttf && start bin/debug/main.exe && del *.o
else
g++ -g -c src/*.cpp -I include -std=c++17 -Wall -m64 && g++ *.o -g -o bin/debug/main -L -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf && ./bin/debug/main && rm *.o
endif


release:
g++ -c src/*.cpp -std=c++17 -O3 -m64 -I include && g++ *.o -o bin/release/main -s -L -lboost_system -lSDL2main -lSDL2 -lSDL2_image && ./bin/release/main
clang++ -c src/*.cpp -std=c++17 -O3 -m64 -I include && clang++ *.o -o bin/release/main -s -L -lboost_system -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf

to_exe:
x86_64-w64-mingw32-g++ -O3 -c src/*.cpp -I include -std=c++17 -m64 && x86_64-w64-mingw32-g++ *.o -o bin/debug/main -L -lSDL2main -lwsock32 -lSDL2 -lSDL2_image -lSDL2_ttf -lws2_32 && rm *.o

to_exe_static:
to_static_win:
x86_64-w64-mingw32-g++ -O3 -c src/*.cpp -I include -std=c++17 -m64 && x86_64-w64-mingw32-g++ *.o -o bin/debug/main -static -Bstatic -L -lSDL2_ttf -lmingw32 -lSDL2_ttf -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf -mwindows -lws2_32 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -lwsock32 -lmingw32 -lSDL2main -lSDL2 -lSDL2_ttf -lws2_32 -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -lcomdlg32 -lhid -lsetupapi -lrpcrt4 -lSDL2_ttf -lrpcrt4 -lsetupapi -lole32 -lgdi32 -lole32 -loleaut32 -limm32 -lwinmm -lversion -static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive
to_static_lin:
clang++ -c src/*.cpp -std=c++17 -O3 -m64 -I include && clang++ -v *.o -o bin/release/main -I/usr/local/include/SDL2 -D_REENTRANT -L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,--enable-new-dtags -Wl,-Bstatic -lSDL2 -lSDL2main -Wl,-Bdynamic -lm -ldl -lpthread -lrt


b:
x86_64-w64-mingw32-g++ -O3 -c src/*.cpp -I include -std=c++17 -m64 && x86_64-w64-mingw32-g++ *.o -o bin/debug/main -static -Bstatic -L -lmingw32 -lSDL2_ttf -lSDL2main -lSDL2 -lSDL2_image -mwindows -lws2_32 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -lwsock32 -lcomdlg32 -lhid -lsetupapi -lrpcrt4
build:
clang++ -g -c src/*.cpp -I include -std=c++17 -Wall -m64 && clang++ *.o -g -o bin/debug/main -L -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf && rm *.o
ifeq ($(OS),Windows_NT)
clang++ -g -c src/*.cpp -I include --std=c++17 -Wall -m64 && clang++ *.o -g -o bin/main -L -lmingw32 -lSDL2 -lSDL2_image -lSDL2_ttf && del *.o
else
clang++ -g -c src/*.cpp -I include -std=c++17 -Wall -m64 && clang++ *.o -g -o bin/main -L -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf && rm *.o
endif

clean:
ifeq ($(OS),Windows_NT)
Expand Down
Binary file added a.out
Binary file not shown.
Binary file added bin/debug/ChessQD_windows.exe
Binary file not shown.
Binary file added bin/release/ChessQD_linux
Binary file not shown.
Binary file added res/font/REFOLTER.otf
Binary file not shown.
Binary file added res/gfx/pawn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/gfx/pieces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/RenderWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RenderWindow::RenderWindow(const char *p_title) { //SDL initiation
std::cout << "TTF_init has failed. Error: " << SDL_GetError() << std::endl;

// font
ChessQLDfont = TTF_OpenFont("bin/debug/res/font/REFOLTER.otf", 128);
ChessQLDfont = TTF_OpenFont("res/font/REFOLTER.otf", 128);
if (ChessQLDfont == nullptr) {
std::cerr << "Failed to load font! SDL_ttf Error: %s\n", TTF_GetError();
}
Expand All @@ -67,7 +67,7 @@ RenderWindow::RenderWindow(const char *p_title) { //SDL initiation
// show cursor
SDL_ShowCursor(1);
// load sprite
loadTexture("bin/debug/res/gfx/pieces.png");
loadTexture("res/gfx/pieces.png");

}

Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "game.hpp"
#define BOOST_TEST_MODULE MyTest

/** main function which starts the game with the default fen
* @param void
Expand Down

0 comments on commit 0ba9987

Please sign in to comment.