#
# $FreeBSD: ports/cad/sis/files/Makefile.FreeBSD,v 1.3 2000/09/16 18:40:54 ade Exp $
#

MACHINE	= FreeBSD
SRCDIR	= ${.CURDIR}
X11	= ${X11BASE}

SIS	= $(SRCDIR)/sis
CAD	= $(SRCDIR)/cad
LIBDIR	= $(PREFIX)/lib/sis

CC	?= cc

all:
	cd sis; $(MAKE) -f Makefile.nooct SIS=$(SIS) LIBDIR=$(LIBDIR) CAD=$(CAD) CC=$(CC); cd ..
	cd utility; $(MAKE) CAD=$(CAD) CC=$(CC) libutility.a; \
	mv libutility.a $(CAD)/lib; cd ..
	cd options; $(MAKE) CAD=$(CAD) CC=$(CC) liboptions.a; \
	mv liboptions.a $(CAD)/lib; cd ..
	cd jedi; $(MAKE) CAD=$(CAD) CC=$(CC); cd ..
	cd espresso; $(MAKE) CAD=$(CAD) CC=$(CC); cd ..
	cd nova; $(MAKE) CAD=$(CAD) SIS=$(SIS) CC=$(CC); cd ..
	cd sred; $(MAKE) SIS=$(SIS) CC=$(CC); cd ..
	cd stamina; $(MAKE) MACHINE=$(MACHINE) CC=$(CC) SIS=$(SIS); cd ..
	cd vst2blif; $(MAKE) MACHINE=$(MACHINE) CC=$(CC); cd ..
	cd blif2vst; $(MAKE) MACHINE=$(MACHINE) CC=$(CC); cd ..
	cd xsis; $(MAKE) SIS=$(SIS) MACHINE=$(MACHINE) X11=$(X11) CC=$(CC); cd ..

clean:
	cd sis; $(MAKE) SIS=$(SIS) CAD=$(CAD) clean; cd ..
	cd utility; $(MAKE) clean; cd ..
	-rm $(CAD)/lib/libutility.a
	cd options; $(MAKE) clean; cd ..
	-rm $(CAD)/lib/liboptions.a
	cd jedi; $(MAKE) clean; cd ..
	cd stamina; $(MAKE) clean; cd ..
	cd sred; $(MAKE) clean; cd ..
	cd nova; $(MAKE) clean; cd ..
	cd espresso; $(MAKE) clean; cd ..
	cd vst2blif; $(MAKE) clean; cd ..
	cd blif2vst; $(MAKE) clean; cd ..
	cd xsis; $(MAKE) clean; cd ..
	cd stamina; $(MAKE) cleanall; cd ..
	cd sis; $(MAKE) strip_depend; rm -rf lib/*; cd ..
	-rm -rf make.out Makefile

