# ***************************************************************************
# Makefile for watcom standard libs

# change comments to use the best suiting assembler/maker/libtool

# ***************************************************************************
# what maker to use
# -* Turbo Make *-
#OBJECTS = new.obj delete.obj dumbsym.obj

# -* Watcom Make *-
OBJECTS = new.obj delete.obj dumbsym.obj

# ***************************************************************************
# -* what assembler to use *-
#ASM=tasm $(tasmoptions)
ASM=wasm $(wasmoptions)

# ***************************************************************************
# -* what libutil to use *-
#  tlib doesn't work with wlink so we just use wlib
# Options:
#  -b , don't backup
#  -n , new lib
#  -q , don't print header ("quiet")
LIBOPTS=-b -n -q
LIBTOOL=wlib $(LIBOPTS) $(LIBFILE)

# ***************************************************************************
# Watcom C/C++ options
# -ms = model small, req for wext
# -zl = remove defaultlib infos, req for wext
# -zq = silent compile
CC=WCC386 -zq
CPP=WPP386 -zq

# ***************************************************************************
# Assembler options

# Options passed to Turbo assembler
# /t = silent compile
tasmoptions=/t
# Options passed to Watcom assembler
# -q = silent compile
wasmoptions=-q

# ***************************************************************************
# Misc
LIBFILE=..\..\..\lib\plib3r.lib

# ***************************************************************************
# Making

# what to make
ALL : $(LIBFILE)

# Libfile
$(LIBFILE) : $(OBJECTS)
  del $(LIBFILE)
  $(LIBTOOL) @linkfile.lnk
  del *.obj

# Objects
new.obj : new.cpp
  $(CPP) new.cpp

delete.obj : delete.cpp
  $(CPP) delete.cpp

dumbsym.obj : dumbsym.asm
  $(ASM) dumbsym.asm
