diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-03 23:57:56 +0100 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-03 23:57:56 +0100 |
| commit | 9c385f9a366da308d2a37ad5deda5d40f9285abb (patch) | |
| tree | 578f6739c8e99f61c0b8747502d8e133e585a7d0 /makemakefile.sh | |
| parent | cd7b608f0517c1100f79b4a3ec654e4178373506 (diff) | |
extend compatibility to Win95 RTM, NT3.1 and Win32s
Only NT3.51 actually works mostly right, all others suffer from various
kinds of breakage. Running a 3.1-compatible binary on newer windows
enables some kind of compatibility mode with bizarro background brushes
and weirdly sized combo boxes.
Going forward, I'm committed to keep NT3.51 running as long as Win95RTM
is supported. The future of NT3.1 and Win32s support is uncertain.
Diffstat (limited to 'makemakefile.sh')
| -rwxr-xr-x | makemakefile.sh | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/makemakefile.sh b/makemakefile.sh index 22ac030..86a69b4 100755 --- a/makemakefile.sh +++ b/makemakefile.sh @@ -13,7 +13,7 @@ ALF_VC6_OBJECTS=$(for i in $ALF_SOURCES; do printf ' out/%s.obj' "$(basename "$i printf '\n' printf 'CXX = i686-w64-mingw32-c++\n' printf 'CFLAGS = -std=c++98 -Wall -Wextra -mwindows -municode -DUNICODE -D_UNICODE -fno-exceptions -fno-rtti -gstabs\n' - printf 'LDFLAGS = -luser32 -lcomctl32 -lshell32 -lrpcrt4 -lversion -static\n' + printf 'LDFLAGS = -luser32 -lcomctl32 -lshell32 -lversion -static\n' printf '\n' printf 'out/widgetfactory.exe: out/widgetfactory.o %s\n' "$ALF_MINGW_OBJECTS" printf '\t$(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)\n' @@ -37,7 +37,7 @@ ALF_VC6_OBJECTS=$(for i in $ALF_SOURCES; do printf ' out/%s.obj' "$(basename "$i printf '\n' printf 'CXX = cl.exe\n' printf 'CFLAGS = -O2 -GA -W3 -DUNICODE -D_UNICODE -D_WIN32=0x0501 -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0501 -nologo\n' - printf 'LDFLAGS = /link unicows.lib kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib version.lib rpcrt4.lib\n' + printf 'LDFLAGS = /link unicows.lib kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib version.lib\n' printf '\n' printf 'out/widgetfactory.exe: out/widgetfactory.obj %s\n' "$ALF_VC6_OBJECTS" @@ -56,13 +56,38 @@ ALF_VC6_OBJECTS=$(for i in $ALF_SOURCES; do printf ' out/%s.obj' "$(basename "$i printf '\tdel /f out\\*.obj out\\*.exe\n\n' ) > Makefile.vc6 +# vc6 nt31 makefile +( + printf '# automatically created by makemakefile.sh. DO NOT EDIT!\n' + printf '\n' + printf 'CXX = cl.exe\n' + printf 'CFLAGS = -O2 -GA -W3 -DUNICODE -D_UNICODE -D_WIN32=0x0501 -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0501 -nologo\n' + printf 'LDFLAGS = /link /subsystem:windows,3.10 /entry:_entry kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib version.lib\n' + + printf '\n' + printf 'out/widgetfactory.exe: out/widgetfactory.obj %s\n' "$ALF_VC6_OBJECTS" + printf '\t$(CXX) $(CFLAGS) -Fe$@ $** $(LDFLAGS)\n' + printf '\n' + for i in $ALF_SOURCES; do + printf 'out/%s: %s %s\n' "$(basename "$i" .cpp).obj" "alf/$i" "$(for k in $ALF_HEADERS; do printf ' alf/%s' "$k"; done)" + printf '\t$(CXX) $(CFLAGS) -c -Fo$@ %s\n\n' "alf/$i" + done + + printf 'out/widgetfactory.obj: widgetfactory.cpp alf/alf.h\n' + printf '\t$(CXX) $(CFLAGS) -c -Fo$@ widgetfactory.cpp\n\n' + + + printf 'clean:\n' + printf '\tdel /f out\\*.obj out\\*.exe\n\n' +) > Makefile.vc6-nt31 + # vc6 ANSI makefile ( printf '# automatically created by makemakefile.sh. DO NOT EDIT!\n' printf '\n' printf 'CXX = cl.exe\n' printf 'CFLAGS = -O2 -GA -W3 -D_WIN32=0x0501 -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0501 -nologo\n' - printf 'LDFLAGS = /link kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib version.lib rpcrt4.lib\n' + printf 'LDFLAGS = /link /entry:_entry kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib version.lib\n' printf '\n' printf 'out/widgetfactory.exe: out/widgetfactory.obj %s\n' "$ALF_VC6_OBJECTS" @@ -81,3 +106,27 @@ ALF_VC6_OBJECTS=$(for i in $ALF_SOURCES; do printf ' out/%s.obj' "$(basename "$i printf '\tdel /f out\\*.obj out\\*.exe\n\n' ) > Makefile.vc6-ansi +# vc6 NT3.1/Win32s ANSI makefile +( + printf '# automatically created by makemakefile.sh. DO NOT EDIT!\n' + printf '\n' + printf 'CXX = cl.exe\n' + printf 'CFLAGS = -O2 -GA -W3 -D_WIN32=0x0501 -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0501 -nologo\n' + printf 'LDFLAGS = /link /subsystem:windows,3.10 /entry:_entry /fixed:no kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib version.lib\n' + + printf '\n' + printf 'out/widgetfactory.exe: out/widgetfactory.obj %s\n' "$ALF_VC6_OBJECTS" + printf '\t$(CXX) $(CFLAGS) -Fe$@ $** $(LDFLAGS)\n' + printf '\n' + for i in $ALF_SOURCES; do + printf 'out/%s: %s %s\n' "$(basename "$i" .cpp).obj" "alf/$i" "$(for k in $ALF_HEADERS; do printf ' alf/%s' "$k"; done)" + printf '\t$(CXX) $(CFLAGS) -c -Fo$@ %s\n\n' "alf/$i" + done + + printf 'out/widgetfactory.obj: widgetfactory.cpp alf/alf.h\n' + printf '\t$(CXX) $(CFLAGS) -c -Fo$@ widgetfactory.cpp\n\n' + + + printf 'clean:\n' + printf '\tdel /f out\\*.obj out\\*.exe\n\n' +) > Makefile.vc6-ansi-31 |
