-LIBTARGET = $(WXLIB)\png.lib
-
-OBJECTS = png.obj pngread.obj pngrtran.obj pngrutil.obj &
- pngpread.obj pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj &
- pngerror.obj pngmem.obj pngwio.obj pngrio.obj pngget.obj pngset.obj
-
-all: $(OBJECTS) $(LIBTARGET)
-
+LIBTARGET = $(WXLIB)\png$(WATCOM_SUFFIX).lib
+
+OBJECTS = &
+ $(OUTPUTDIR)\png.obj &
+ $(OUTPUTDIR)\pngread.obj &
+ $(OUTPUTDIR)\pngrtran.obj &
+ $(OUTPUTDIR)\pngrutil.obj &
+ $(OUTPUTDIR)\pngpread.obj &
+ $(OUTPUTDIR)\pngtrans.obj &
+ $(OUTPUTDIR)\pngwrite.obj &
+ $(OUTPUTDIR)\pngwtran.obj &
+ $(OUTPUTDIR)\pngwutil.obj &
+ $(OUTPUTDIR)\pngerror.obj &
+ $(OUTPUTDIR)\pngmem.obj &
+ $(OUTPUTDIR)\pngwio.obj &
+ $(OUTPUTDIR)\pngrio.obj &
+ $(OUTPUTDIR)\pngget.obj &
+ $(OUTPUTDIR)\pngset.obj
+
+all: $(OUTPUTDIR) $(LIBTARGET) .SYMBOLIC
+
+$(OUTPUTDIR):
+ @if not exist $^@ mkdir $^@
+
+LBCFILE=$(OUTPUTDIR)\png.lbc