Hi Martin, these don't compile here. Also with the default MAKESHELL=sh.exe make clean also fails like so,
H:\tmp\GAME-SDL-ACTION-KoboDeluxe>make -f Makefile.os2 clean
del /Q src\*.obj src\*.d 2>nul
make.exe: [Makefile.os2:102: clean] Error 127 (ignored)
del /Q src\graphics\*.obj src\graphics\*.d 2>nul
make.exe: [Makefile.os2:103: clean] Error 127 (ignored)
del /Q src\sound\*.obj src\sound\*.d 2>nul
make.exe: [Makefile.os2:104: clean] Error 127 (ignored)
del /Q src\eel\*.obj src\eel\*.d 2>nul
make.exe: [Makefile.os2:105: clean] Error 127 (ignored)
del /Q kobodl.exe 2>nul
make.exe: [Makefile.os2:106: clean] Error 127 (ignored)
Here's a quick fix for the KoboDeluxe Makefile.os2,
diff --git a/Makefile.os2 b/Makefile.os2
index 27cab6c..d58cf6c 100644
--- a/Makefile.os2
+++ b/Makefile.os2
@@ -21,16 +21,16 @@ WARNFLAGS = -Wall \
-Wno-array-bounds \
-Wno-sequence-point
-CFLAGS = -Zomf -Zmt -O2 -MMD -MP $(WARNFLAGS) \
+CFLAGS = -O2 -MMD -MP $(WARNFLAGS) \
-Isrc -Isrc/graphics -Isrc/sound -Isrc/eel -Idata/sfx \
- -IC:/usr/include -IC:/usr/include/SDL2 \
+ -I/@unixroot/usr/include -I/@unixroot/usr/include/SDL2 \
$(DEFINES)
CXXFLAGS = $(CFLAGS) -Wno-literal-suffix
-LDFLAGS = -Zomf -Zmt -Zstack 512
-LIBS = C:/usr/lib/SDL2_dll.a \
- C:/usr/lib/SDL2_image_dll.a \
- C:/usr/lib/SDL2_mixer_dll.a
+LDFLAGS = -Zomf -Zhigh-mem -Zmap
+LIBS = /@unixroot/usr/lib/SDL2_dll.a \
+ /@unixroot/usr/lib/SDL2_image_dll.a \
+ /@unixroot/usr/lib/SDL2_mixer_dll.a
TARGET = kobodl.exe
@@ -99,11 +99,11 @@ $(TARGET): $(ALLOBJS) src/kobodl.def
$(CC) $(CFLAGS) -c -o $@ $<
clean:
- -del /Q src\*.obj src\*.d 2>nul
- -del /Q src\graphics\*.obj src\graphics\*.d 2>nul
- -del /Q src\sound\*.obj src\sound\*.d 2>nul
- -del /Q src\eel\*.obj src\eel\*.d 2>nul
- -del /Q $(TARGET) 2>nul
+ -rm -rf src\*.obj src\*.d 2>nul
+ -rm -rf src\graphics\*.obj src\graphics\*.d 2>nul
+ -rm -rf src\sound\*.obj src\sound\*.d 2>nul
+ -rm -rf src\eel\*.obj src\eel\*.d 2>nul
+ -rm -rf $(TARGET) 2>nul
.PHONY: all clean
Big breaker was using C: instead of /@unixroot. My @unixroot is W:
CFLAGS, -Zomf is optional, I don't usually use it in CFLAGS as it slightly slows things down. Ideally without the -Zomf, the objects should use .o as a suffix instead of .obj
-Zmt is an EMXism (use multithread library) that doesn't make sense with kLIBC, though it is accepted and ignored for compatibility.
LDFLAGS, same with -Zmt as above. -Zstack removed as the DEF file has a stack directive. Also really the defaults are probably fine, personal preference. added -Zhigh-mem to use high memory when possible. Added -Zmap for help with debugging, also can build an XQS with it, "mapxqs kobodl.map" Mapfile currently isn't cleaned, easy to fix.
Use rm -rf instead of DEL to clean.
Most of these are suggestions, though the hard coded C: is a deal breaker here.