sdl12-compat: add resource to windows watcom builds

From c0504eb42c7cabc23c6b4a16f5915ee49962ddff Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 12 Jun 2021 20:15:30 +0300
Subject: [PATCH] add resource to windows watcom builds

---
 src/Makefile.w32 | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Makefile.w32 b/src/Makefile.w32
index 833a202..ae610e6 100644
--- a/src/Makefile.w32
+++ b/src/Makefile.w32
@@ -1,4 +1,4 @@
-#  OpenWatcom makefile to build SDL for Win32.
+#  OpenWatcom makefile to build SDL for Win32
 
 !ifndef %WATCOM
 !error Environment variable WATCOM is not specified!
@@ -28,19 +28,20 @@ CFLAGS+= -wcd=200
 # newer OpenWatcom versions enable W303 by default
 CFLAGS+= -wcd=303
 
-DESCRIPTION = Simple DirectMedia Layer 1.2
-
 object_files= SDL12_compat.obj
+resource_obj= version.res
 
 .extensions:
-.extensions: .lib .dll .obj .c .asm
+.extensions: .lib .dll .obj .c .asm .res .rc
 
 .c.obj:
 	wcc386 $(CFLAGS) -fo=$^@ $<
+.rc.res:
+	wrc -q -r -bt=nt -I"$(%WATCOM)/h/nt" -fo=$^@ $<
 
 all: $(DLLFILE) $(LIBFILE) .symbolic
 
-$(DLLFILE): compiling_info $(object_files) $(LNKFILE)
+$(DLLFILE): compiling_info $(object_files) $(resource_obj) $(LNKFILE)
 	@echo * Linking: $@
 	@wlink @$(LNKFILE)
 
@@ -58,18 +59,17 @@ $(LNKFILE):
 	@%append $@ NAME $(DLLFILE)
 	@for %i in ($(object_files)) do @%append $@ FILE %i
 	@%append $@ EXPORT=SDL12.lbc
+	@%append $@ OPTION RESOURCE=$(resource_obj)
 	@%append $@ OPTION QUIET
-	@%append $@ OPTION IMPF=$^&.exp
 	@%append $@ OPTION MAP=$^&.map
-	@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
 	@%append $@ OPTION ELIMINATE
 	@%append $@ OPTION SHOWDEAD
 
 clean: .SYMBOLIC
 	@echo * Clean: $(LIBNAME) $(VERSION)
 	@if exist *.obj rm *.obj
+	@if exist *.res rm *.res
 	@if exist *.map rm *.map
-	@if exist *.exp rm *.exp
 	@if exist $(LNKFILE) rm $(LNKFILE)
 
 distclean: clean .SYMBOLIC