
#
# Portable Object Compiler
# $Id: Makefile.wmk,v 1.2 1999/07/11 17:48:05 stes Exp $
#

#
# This Makefile should work with Sybase WATCOM wmake
#

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
IFLAGS=-noI -I..\..\include\objcrt -I..\..\include\objpak
MFLAGS=$(OPT_MFLAGS)

.SUFFIXES: .m 

LIBRARY=oclib.lib

OBJFILES=&
    node.$(OBJSUFFIX)&
    symbol.$(OBJSUFFIX)&
    stclass.$(OBJSUFFIX)&
    cppdirec.$(OBJSUFFIX)&
    type.$(OBJSUFFIX)&
    options.$(OBJSUFFIX)&
    stmt.$(OBJSUFFIX)&
    ifstmt.$(OBJSUFFIX)&
    whilstmt.$(OBJSUFFIX)&
    switstmt.$(OBJSUFFIX)&
    lblstmt.$(OBJSUFFIX)&
    rtrnstmt.$(OBJSUFFIX)&
    dfltstmt.$(OBJSUFFIX)&
    casestmt.$(OBJSUFFIX)&
    compstmt.$(OBJSUFFIX)&
    exprstmt.$(OBJSUFFIX)&
    gotostmt.$(OBJSUFFIX)&
    contstmt.$(OBJSUFFIX)&
    forstmt.$(OBJSUFFIX)&
    dostmt.$(OBJSUFFIX)&
    decl.$(OBJSUFFIX)&
    pointer.$(OBJSUFFIX)&
    arydecl.$(OBJSUFFIX)&
    fundecl.$(OBJSUFFIX)&
    precdecl.$(OBJSUFFIX)&
    bflddecl.$(OBJSUFFIX)&
    pfixdecl.$(OBJSUFFIX)&
    initdecl.$(OBJSUFFIX)&
    keywdecl.$(OBJSUFFIX)&
    namedecl.$(OBJSUFFIX)&
    stardecl.$(OBJSUFFIX)&
    expr.$(OBJSUFFIX)&
    listxpr.$(OBJSUFFIX)&
    keywxpr.$(OBJSUFFIX)&
    condxpr.$(OBJSUFFIX)&
    castxpr.$(OBJSUFFIX)&
    unyxpr.$(OBJSUFFIX)&
    deref.$(OBJSUFFIX)&
    addrof.$(OBJSUFFIX)&
    sizeof.$(OBJSUFFIX)&
    typeof.$(OBJSUFFIX)&
    pfixxpr.$(OBJSUFFIX)&
    indexxpr.$(OBJSUFFIX)&
    binxpr.$(OBJSUFFIX)&
    dotxpr.$(OBJSUFFIX)&
    arrowxpr.$(OBJSUFFIX)&
    msgxpr.$(OBJSUFFIX)&
    blockxpr.$(OBJSUFFIX)&
    selxpr.$(OBJSUFFIX)&
    precxpr.$(OBJSUFFIX)&
    commaxpr.$(OBJSUFFIX)&
    constxpr.$(OBJSUFFIX)&
    identxpr.$(OBJSUFFIX)&
    assign.$(OBJSUFFIX)&
    relxpr.$(OBJSUFFIX)&
    funcall.$(OBJSUFFIX)&
    btincall.$(OBJSUFFIX)&
    def.$(OBJSUFFIX)&
    fundef.$(OBJSUFFIX)&
    methdef.$(OBJSUFFIX)&
    funbody.$(OBJSUFFIX)&
    method.$(OBJSUFFIX)&
    selector.$(OBJSUFFIX)&
    gasmop.$(OBJSUFFIX)&
    gasmstmt.$(OBJSUFFIX)&
    gattrib.$(OBJSUFFIX)&
    gatrdecl.$(OBJSUFFIX)&
    compdef.$(OBJSUFFIX)&
    datadef.$(OBJSUFFIX)&
    structsp.$(OBJSUFFIX)&
    classdef.$(OBJSUFFIX)&
    enumtor.$(OBJSUFFIX)&
    enumsp.$(OBJSUFFIX)&
    parmdef.$(OBJSUFFIX)&
    parmlist.$(OBJSUFFIX)&
    util.$(OBJSUFFIX)&
    trlunit.$(OBJSUFFIX)

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

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

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

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

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

