
#
# Portable Object Compiler
# $Id: Makefile.wmk,v 1.1.1.1 1999/03/22 21:48:43 stes Exp $
#

#
# This Makefile should work with Sybase WATCOM wmake
#

MKDIR=mkdir
OBJC=objc
RM=del
CP=copy
AR=wlib -q -c -b
RANLIB=echo
MAKE=wmake
DBG_MFLAGS=-q -d2 -od
OPT_MFLAGS=-q -DNDEBUG
OBJSUFFIX=obj
LIBSUFFIX=lib
BOOTDIR=..\..
LIBDIR=$(BOOTDIR)\lib
IFLAGS=-noI -I..\..\include\objcrt
MFLAGS=$(OPT_MFLAGS)

.SUFFIXES: .m

DLL=objpak.dll
LIBRARY=objpak.lib

OBJFILES=&
	ascfiler.obj&
	cltn.obj&
	  ordcltn.obj&
	  sortcltn.obj&
	  set.obj&
	  bag.obj&
	  stack.obj&
	  runarray.obj&
        dictnary.obj&
	sequence.obj&
	array.obj&
	  idarray.obj&
	  intarray.obj&
	  ocstring.obj&
	rectangl.obj&
	point.obj&
	assoc.obj&
	objgraph.obj&
	cltnseq.obj&
	keyseq.obj&
	valueseq.obj&
	setseq.obj&
	bagseq.obj&
	txtattr.obj&
	octext.obj&
	txtstyle.obj&
	paragrph.obj&
	treeseq.obj

.m.obj:
	@set INCPATH=$(IFLAGS)
	$(OBJC) -c $(MFLAGS) @INCPATH $*.m
	$(AR) $(LIBRARY) +- $@ 

$(LIBRARY) : $(OBJFILES)
	$(RANLIB) $(LIBRARY)

$(DLL) : $(OBJFILES)
	objc -dl $(OBJFILES) -o $(DLL)
	wlib -n $(LIBRARY) +$(DLL)

bootstrap : .SYMBOLIC
	-$(MKDIR) $(LIBDIR)
	-$(CP) $(LIBRARY) $(LIBDIR)

cleantmp : .SYMBOLIC
	-$(RM) *.P
	-$(RM) *.c
	-$(RM) *.i

.NOCHECK
clean : cleantmp
	-$(RM) *.obj
	-$(RM) *.lib

.NOCHECK
distclean : clean
	-$(RM) Makefile 
	-$(RM) config.h 

