# $Header: $
# lmk.def - local makefile, use with "lmk -f lmkmeta all"
#	Copyright 1989, Commodore-Amiga, Inc.
#	All rights reserved.

SUBSYSNAME=utility

#	for dependency of .with file
MAKEFILE=lmk.def
METAFILE=

#	precompiled include file
SYM=$(SUBSYSNAME).sym
SYMSRC= sysall.h
SYMDIR= QUAD:

SRCDIR=src/kickstart/$(SUBSYSNAME)
DOCDIR=doc
BINDIR=$(SRCDIR)
INCDIR=utility
# full pathname required here
BACKUPDIR=A:backup/fast/jimm/work/amiga/utility

#####	file macros for standard build and installation

AFILES=ulib.asm ufunctions.asm callhook.asm math.asm datetools.asm
CFILES=tagitem.c hardware.c

FIRSTO=ulib.o
OFILES=ufunctions.o tagitem.o callhook.o math.o datetools.o hardware.o
BINFILES=$(SUBSYSNAME).ld $(SUBSYSNAME).library

MYHFILES=ubase.h $(SUBSYSNAME)_rev.h
MYIFILES=ubase.i asmsupp.i $(SUBSYSNAME)_rev.i

# ZZZ: need date.h
EXTERNHFILES=tagitem.h utility.h hooks.h
EXTERNIFILES=tagitem.i hooks.i date.i

# ZZZ: no prototype yet
#PROTO= $(SUBSYSNAME)_protos.h
PROTO=
PRAGMA= $(SUBSYSNAME)_pragmas.h

MISCSRC=testclient.c todo
MISCDOC=
MYLIBS=
FDFILE=$(SUBSYSNAME)_lib.fd

###########################################################
#	compiler/assembler/linker options, include paths

CINCL= -iMYINCLUDE: -iVINCLUDE: -iVINCLUDE:/inc.lattice.strip
CFLAGS= -. -v -d -cwus -ml

AINCL= -i MYINCLUDE: -i VINCLUDE:
AFLAGS=	-cvrf

LFLAGS=BATCH BUFSIZE 1024 QUIET SC SD
STARTUP=

#	build the precompiled include file, my .ld and my stripped .library
#all: $(SYMDIR)$(SYM) $(SUBSYSNAME)

all: $(SUBSYSNAME).library $(PROTOFILES)

#	automatic version bump (must follow all:, must have ulib.asm)
ulib.o: ulib.asm $(SUBSYSNAME)_rev.i

###########################################################
#	special handling for lattice assembled modules

math.o: math.asm
	asm -iVINCLUDE: -m2 $*.asm

datetools.o: datetools.asm
	asm -iVINCLUDE: -m2 $*.asm
