#Buildfile for doseq and dopar

#include ../../buildprefix

 
SEQOBJECTS = doseq.b common.b
PAROBJECTS = dopar.b common.b

SEQLIBRARIES =
PARLIBRARIES = -lVexec

HEADERS =
SOURCES = doseq.c dopar.c common.c
OBJECTS = doseq.b dopar.b common.b

#ifdef X
OPTS = -O -V -vx
#else X
OPTS = -O -V
#endif X
INCLUDES = -I../../libc/include 
.SUFFIXES: .b .ls .s .c
# normal compile of a module
.c.b:
	cc68 $(OPTS) $(INCLUDES) -c $*.c 

# how to make an assembly file (Not deleting it or assembling it)
.c.s:
	cc68 $(OPTS) $(INCLUDES) -S $*.c

# how to make an assembly listing
.c.ls:
	cc68 $(OPTS) $(INCLUDES) -c -L $*.c

all: doseq dopar

doseq: $(SEQOBJECTS)
	cc68 -r $(OPTS) -o doseq $(SEQOBJECTS) $(SEQLIBRARIES)
# "domake" is by default a synonym for "doseq".
	cp doseq domake

dopar: $(PAROBJECTS)
	cc68 -r $(OPTS) -o dopar $(PAROBJECTS) $(PARLIBRARIES)
 
install: all
#ifdef X
	netinstall -x "doseq domake dopar" /usr/sun/xVboot
#else X
	netinstall "doseq domake dopar" /usr/sun/Vboot
#endif X
 
clean:
	rm -f *.BAK *.CKP .emacs_* $(OBJECTS) domake
 
cleanbak:
	rm -f *.BAK *.CKP .emacs_*
 
tags: $(HEADERS) $(SOURCES)
	ctags $(HEADERS) $(SOURCES)
 
lint:
	lint -hbxac $(HEADERS) $(SOURCES)
 
sources:
	co $(HEADERS) $(SOURCES) buildfile
 
rcs:
	ci -f $(HEADERS) $(SOURCES) buildfile
 
