#
# Lattice LKM makefile, for SAS/C C V5.10a                          :ts=8
#
# CpuBlit (C) Copyright Eddy Carroll, Feb 1991
#

#DBSYM	= -d5
CFLAGS	= -cusq -j88i -ms -v $(DBSYM)
BFLAGS	= sc sd nd map ram:map
#BFLAGS	= sc sd map ram:map addsym
LIBS	= lib:lc.lib lib:amiga.lib
ASM	= lc:asm

.c.o:
	lc $(CFLAGS) -Hsystem.sym $*.c
.s.o:
	$(ASM) -iinclude: $*.s    # Standard "pure" assembly
.a.o:
	$(ASM) -u -iinclude: $*.a # Prefixes all labels with style underscore
.n.doc:
	nro >$*.doc -ms:an $*.n
.h.sym:
	lc1 -ph -o$*.sym $*.h

#
# Makefile dependencies
#

NAME	= cpublit

all: $(NAME)

OBJS	= small.o $(NAME).o scroll.o res.o

$(NAME): $(OBJS) makefile
	blink from $(OBJS) to $(NAME) $(BFLAGS) lib $(LIBS)

system.sym:	system.h
cpublit.o:	cpublit.c	scroll.h	system.sym
small.o:	small.a
scroll.o:	scroll.s
res.o:		res.s
