WXDIR = ..\..
EXTRACPPFLAGS=-DPOSIX_MISTAKE
+OUTPUTDIR=watcom\
+
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
-LIBTARGET = $(WXLIB)\regex.lib
+LIBTARGET = $(WXLIB)\regex$(WATCOM_SUFFIX).lib
+
+OBJECTS = &
+ $(OUTPUTDIR)regcomp.obj &
+ $(OUTPUTDIR)regexec.obj &
+ $(OUTPUTDIR)regerror.obj &
+ $(OUTPUTDIR)regfree.obj
-OBJECTS= &
- regcomp.o &
- regexec.o &
- regerror.o &
- regfree.o
+all: $(OUTPUTDIR) $(LIBTARGET) .SYMBOLIC
-all: $(OBJECTS) $(LIBTARGET)
+$(OUTPUTDIR):
+ @if not exist $^@ mkdir $^@
+LBCFILE=$(OUTPUTDIR)regex.lbc
$(LIBTARGET) : $(OBJECTS)
- %create tmp.lbc
- @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
- wlib /b /c /n /p=512 $^@ @tmp.lbc
+ %create $(LBCFILE)
+ @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
+ wlib /q /b /c /n /p=512 $^@ @$(LBCFILE)
-clean:
+clean: .SYMBOLIC
-erase *.obj
-erase $(LIBTARGET)
-erase *.pch