diff --git a/.gitea/build-main.yaml b/.gitea/workflows/build-main.yaml similarity index 92% rename from .gitea/build-main.yaml rename to .gitea/workflows/build-main.yaml index f422e54..271f829 100644 --- a/.gitea/build-main.yaml +++ b/.gitea/workflows/build-main.yaml @@ -4,9 +4,11 @@ on: push: branches: - main + - master pull_request: branches: - main + - master jobs: build-debug-dos: @@ -40,7 +42,7 @@ jobs: release build-debug-sdlwin64: - runs-on: ubuntu-mingw-cmake-latest + runs-on: ubuntu-builder-latest steps: - name: Checkout code uses: actions/checkout@v4 @@ -55,7 +57,7 @@ jobs: debug build-release-sdlwin64: - runs-on: ubuntu-mingw-cmake-latest + runs-on: ubuntu-builder-latest steps: - name: Checkout code uses: actions/checkout@v4 @@ -68,10 +70,9 @@ jobs: name: release-sdlwin64 path: release - game.img build-debug-sdl: - runs-on: ubuntu-latest + runs-on: ubuntu-builder-latest steps: - name: Checkout code uses: actions/checkout@v4 @@ -86,7 +87,7 @@ jobs: debug build-release-sdl: - runs-on: ubuntu-latest + runs-on: ubuntu-builder-latest steps: - name: Checkout code uses: actions/checkout@v4 @@ -99,4 +100,3 @@ jobs: name: release-sdl path: release - game.img diff --git a/.gitignore b/.gitignore index e5626be..1a464cc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ debug *.o *.gbm gbmconv +game game.exe game.img diff --git a/Makefile b/Makefile index 807581e..72337be 100644 --- a/Makefile +++ b/Makefile @@ -24,20 +24,22 @@ CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ LD=i686-w64-mingw32-g++ STRIP=i686-w64-mingw32-strip -WINDRES=windres +WINDRES=i686-w64-mingw32-windres -SDL_INCLUDE=-I../SDL2-2.32.10/i686-w64-mingw32/include/SDL2 -SDL_LDFLAGS=-L../SDL2-2.32.10/i686-w64-mingw32/lib +SDL_INCLUDE=-I/usr/i686-w64-mingw32/include/SDL2 +SDL_LDFLAGS=-L/usr/i686-w64-mingw32/lib SDL_LIBS=-lmingw32 -lSDL2main -lSDL2.dll CFLAGS=-g -DBUILD_SDL $(SDL_INCLUDE) -m32 CXXFLAGS=$(CFLAGS) -LDFLAGS=$(SDL_LDFLAGS) -mwindows +LDFLAGS=$(SDL_LDFLAGS) +#LDFLAGS+=-mwindows LDLIBS=$(SDL_LIBS) -lstdc++ EXE=game.exe -EXTRA_FILES=../SDL2-2.32.10/i686-w64-mingw32/bin/SDL2.dll -EXTRA_FILES+=/usr/lib/gcc/i686-w64-mingw32/10-win32/libgcc_s_dw2-1.dll -EXTRA_FILES+=/usr/lib/gcc/i686-w64-mingw32/10-win32/libstdc++-6.dll +EXTRA_FILES=$(shell find /usr/i686-w64-mingw32/ -iname 'SDL2.dll' | head -n1) +EXTRA_FILES+=$(shell find /usr/lib/gcc/i686-w64-mingw32/ -iname 'libgcc_s_dw2-1.dll' | grep win32 | head -n1) +EXTRA_FILES+=$(shell find /usr/lib/gcc/i686-w64-mingw32/ -iname 'libgcc_s_seh-1.dll' | grep win32 | head -n1) +EXTRA_FILES+=$(shell find /usr/lib/gcc/i686-w64-mingw32/ -iname 'libstdc++-6.dll' | grep win32 | head -n1) SYSTEM=SDL PLATFORM_OBJ=app.res else ifeq ($(TARGET),SDLWIN64) @@ -46,28 +48,29 @@ CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ LD=x86_64-w64-mingw32-g++ STRIP=x86_64-w64-mingw32-strip -WINDRES=windres +WINDRES=x86_64-w64-mingw32-windres -SDL_INCLUDE=-I../SDL2-2.32.10/x86_64-w64-mingw32/include/SDL2 -SDL_LDFLAGS=-L../SDL2-2.32.10/x86_64-w64-mingw32/lib +SDL_INCLUDE=-I/usr/x86_64-w64-mingw32/include/SDL2 +SDL_LDFLAGS=-L/usr/x86_64-w64-mingw32/lib SDL_LIBS=-lmingw32 -lSDL2main -lSDL2.dll CFLAGS=-g -DBUILD_SDL $(SDL_INCLUDE) -m64 CXXFLAGS=$(CFLAGS) -#LDFLAGS=$(SDL_LDFLAGS) -mwindows LDFLAGS=$(SDL_LDFLAGS) +#LDFLAGS+=-mwindows LDLIBS=$(SDL_LIBS) -lstdc++ EXE=game.exe -EXTRA_FILES=../SDL2-2.32.10/x86_64-w64-mingw32/bin/SDL2.dll -EXTRA_FILES+=/mingw64/bin/libgcc_s_seh-1.dll -EXTRA_FILES+=/mingw64/bin/libstdc++-6.dll +EXTRA_FILES=$(shell find /usr/x86_64-w64-mingw32/ -iname 'SDL2.dll' | head -n1) +EXTRA_FILES+=$(shell find /usr/lib/gcc/x86_64-w64-mingw32/ -iname 'libgcc_s_dw2-1.dll' | grep win32 | head -n1) +EXTRA_FILES+=$(shell find /usr/lib/gcc/x86_64-w64-mingw32/ -iname 'libgcc_s_seh-1.dll' | grep win32 | head -n1) +EXTRA_FILES+=$(shell find /usr/lib/gcc/x86_64-w64-mingw32/ -iname 'libstdc++-6.dll' | grep win32 | head -n1) SYSTEM=SDL PLATFORM_OBJ=app.res else # DOS -CC=/usr/local/djgpp/bin/i586-pc-msdosdjgpp-gcc -CXX=/usr/local/djgpp/bin/i586-pc-msdosdjgpp-g++ -LD=/usr/local/djgpp/bin/i586-pc-msdosdjgpp-g++ +CC=i586-pc-msdosdjgpp-gcc +CXX=i586-pc-msdosdjgpp-g++ +LD=i586-pc-msdosdjgpp-g++ STRIP=i586-pc-msdosdjgpp-strip # FIXME: we override the host compiler to build tools here, maybe move tools to a separate Makefile