# Public screen demo
# LATTICE
# created Jan 9, 1990, for Beta1, EuroDevCon

##### setup	#####
SYM=pubsc.sym
SYMSRC= sysall.h
SYMDIR=ram:

# INCLUDE assign volumes used (or change this line)
# VINCLUDE:	v36 include (stripped) directory
# INCLATTICE:	Lattice's standard include directory, e.g. <stdio.h>
# MYINCLUDE:	development overrides of system includes,
#		 you can remove this, or use it for interim bug
#		 fixes in the include files
# VLIB:		location of V36 amiga.lib, debug.lib
INCLUDE= -iMYINCLUDE: -iVINCLUDE: -iINCLATTICE:

##### options	#####
# lc pass 1
CFLAGS1=-. $(INCLUDE) -d -cwus -H$(SYMDIR)$(SYM)
# lc pass 2
CFLAGS2=-. -v
# linker
BLOPTS=BATCH BUFSIZE 1024 QUIET SC SD
LIBS= LIB:lc.lib  LIB:amiga.lib 

##### rules	#####
# lattice compiler, separate passes for no particular reason
.c.o:
	@echo "	$*.c pass 1"
	lc1 $(CFLAGS1) -oquad:$*.q $* 
	go quad:$*.q
	@echo "	$*.c pass 2"
	lc2 $(CFLAGS2) -o$*.o quad:$*.q 

# produce a "listing" file (by disassembly)
.o.lst:
	omd >$*.lst $*.o $*.c

###### targets #####
all: $(SYMDIR)$(SYM) pubsc

CGO=cgmain.o igadgets.o ellipse.o images.o dialgadget.o 
cgdemo: $(CGO)
	blink $(BLOPTS) FROM lib:c.o $(CGO) LIB $(LIBS) TO $@

PUBSCO=psmain.o pubsc.o button.o commgad.o igadgets.o images.o textmsg.o
pubsc: $(PUBSCO)
	blink $(BLOPTS) FROM lib:c.o $(PUBSCO) LIB $(LIBS) TO $@

##### make precompiled header files	#####

$(SYMDIR)$(SYM): $(SYM)
	copy $(SYM) $(SYMDIR)

$(SYM): $(SYMSRC)
	lc1 $(INCLUDE) -ph -o$(SYM) $(SYMSRC)
