diff --git a/.gitignore b/.gitignore index 7c381c9..c3f0185 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.o *.lib +*.dll *.exe *.run *.tmp diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..46f462d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +image: debian:latest + +before_script: | + apt update + apt install \ + make gcc cc65 python3 python3-pil \ + libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev \ + libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev + +Tests: + script: | + cd ./LibMultiSpacc/Examples + for Example in */ + do + cd ${Example} + for Build in "Target=LinuxPC MultiSpacc_Target=SDL12" "Target=LinuxPC MultiSpacc_Target=SDL20" "Target=NES" + do + make clean + make -j$(nproc --all) ${Build} + done + cd .. + done + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH diff --git a/LibMultiSpacc/Examples/Common.mk b/LibMultiSpacc/Examples/Common.mk index d8cbaf1..24a1cca 100644 --- a/LibMultiSpacc/Examples/Common.mk +++ b/LibMultiSpacc/Examples/Common.mk @@ -23,6 +23,14 @@ ifdef Target ExeSuffix = .exe Defines += -DTarget_WindowsPC MultiSpacc_Target = SDL20 + else ifeq ($(Target), Windows9x) + ExeSuffix = .exe + Defines += -DTarget_Windows9x + MultiSpacc_Target = SDL12 + LdFlags += -lmingw32 -static-libgcc + ToolsSyspath=/c/Files/Sdk/mingw32/bin + ToolsPrefix=$(ToolsSyspath)/ + export PATH=$$PATH:$(ToolsSyspath) else ifeq ($(Target), NDS) Defines += -DTarget_NDS MultiSpacc_Target = NDS @@ -35,12 +43,12 @@ endif ifeq ($(MultiSpacc_Target), SDL12) Defines += -DMultiSpacc_Target_SDL12 -DMultiSpacc_Target_SDLCom CFlags += $(shell sdl-config --cflags) - LdFlags += $(shell sdl-config --libs) -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf + LdFlags += $(shell sdl-config --libs) -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf BuildProcess = __Normal__ else ifeq ($(MultiSpacc_Target), SDL20) Defines += -DMultiSpacc_Target_SDL20 -DMultiSpacc_Target_SDLCom CFlags += $(shell sdl2-config --cflags) - LdFlags += $(shell sdl2-config --libs) -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf + LdFlags += $(shell sdl2-config --libs) -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf BuildProcess = __Normal__ else ifeq ($(MultiSpacc_Target), NDS) Defines += -DMultiSpacc_Target_NDS @@ -56,7 +64,7 @@ BuildObjects = $(BuildSources:.c=.o) All all: $(BuildProcess) -# TODO: use virtual build dirs even for normals to allow linking against different wrapped libraries +# TODO: use virtual build dirs even for normals to allow linking against different libraries without recleaning __Normal__: $(BuildObjects) $(CC) $^ $(LdFlags) -o $(AppName)$(ExeSuffix)