#
# This builds the Watcom library with Watcom's wcc386 under Dos
#
# You'll need Watcom's wmake
#
# Invoke by "wmake -f arch\msdos\makefile.wat" when in the "lib" directory
# This will build "freetype\lib\libttf.lib"
#

# .EXTENSIONS:
# .EXTENSIONS: .exe .obj .c .h
# .obj:.;.\extend
# .c:.;.\extend
# .h:.;.\extend

# CC = wcc386
CC = cl

# CCFLAGS = /otexanl+ /s /w4 /zq /d3 -Iarch\msdos -I. -Iextend
CCFLAGS = /otexanl+ -Iarch\msdos -I. -Iextend

OBJS = ttapi.obj     ttcache.obj  ttcalc.obj   ttcmap.obj    ttdebug.obj \
       tterror.obj   ttfile.obj   ttgload.obj  ttinterp.obj  ttlists.obj \
       ttload.obj    ttmemory.obj ttmutex.obj  ttobjs.obj    ttraster.obj \
       ttextend.obj  extend\ftxgasp.obj  extend\ftxkern.obj

.c.obj:
	cl /c $(CCFLAGS) $*.c
# .c.obj :
#  $(CC) $(CCFLAGS) $[* /fo=$[*.obj

libname = libttf
libfile = $(libname).lib
cmdfile = $(libname).lst

$(libfile) : $(OBJS) 
  lib -nologo -out:$(libfile) $(OBJS)

$(cmdfile) : $(OBJS)
  @for %i in ($(OBJS)) do @%append $(cmdfile) +-%i

clean: .symbolic
         @-erase *.obj
         @-erase extend\*.obj
         @-erase $(cmdfile)

distclean: .symbolic clean
         @-erase $(libfile)

new: .symbolic
         @-wtouch *.c

