X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a2c6ef8d186df490df28a694820a5e8afc4b5e8..70914290a18a1c95c16ff5148d53f3dea52d2940:/src/zlib/makefile.wat

diff --git a/src/zlib/makefile.wat b/src/zlib/makefile.wat
index 7f196ab011..3ea09da555 100644
--- a/src/zlib/makefile.wat
+++ b/src/zlib/makefile.wat
@@ -13,7 +13,7 @@
 
 # ------------- Watcom 10a -------------
 MODEL=-mf 
-CFLAGS= $(MODEL) -fpi87 -fp5 -zp4 -5r -w5 -oneatx -DMSDOS
+CFLAGS= $(MODEL) -fpi87 -fp5 -zp4 -5r -w5 -oneatx -DWIN32
 CC=wcc386
 LD=wcl386
 LIB=wlib -b -c 
@@ -22,12 +22,9 @@ O=.obj
 LIBTARGET=..\..\lib\zlib.lib
 
 # variables
-OBJ1=adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) 
-OBJ2=trees$(O) zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) 
-OBJ3=infutil$(O) inffast$(O)
-OBJP1=adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)
-OBJP2=trees$(O)+zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)
-OBJP3=infutil$(O)+inffast$(O)
+OBJECTS=adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) &
+        trees$(O) zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) &
+        infutil$(O) inffast$(O)
 
 # all: test
 
@@ -83,12 +80,11 @@ example.obj: example.c zlib.h zconf.h
 minigzip.obj: minigzip.c zlib.h zconf.h
 	$(CC) $(CFLAGS) $*.c
 
-# we must cut the command line to fit in the MS/DOS 128 byte limit:
-$(LIBTARGET): $(OBJ1) $(OBJ2) $(OBJ3) 
-	del $(LIBTARGET)
-	$(LIB) $(LIBTARGET) +$(OBJP1)
-	$(LIB) $(LIBTARGET) +$(OBJP2)
-	$(LIB) $(LIBTARGET) +$(OBJP3)
+$(LIBTARGET) : $(OBJECTS)
+	%create tmp.lbc
+	@for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
+	wlib /b /c /n /p=512 $^@ @tmp.lbc
+
 
 example.exe: example.obj $(LIBTARGET)
 	$(LD) $(LDFLAGS) example.obj $(LIBTARGET)
@@ -101,7 +97,7 @@ test: minigzip.exe example.exe
 	echo hello world | minigzip | minigzip -d >test
 	type test
 
-clean:
+clean: .SYMBOLIC
 	-erase *.obj
 	-erase *.exe
         -erase $(LIBTARGET)