# Don't make this directly.  Make using Makefile, which ensures that
# Makefile.dep has been made.  If you absolutely use must it directly, do
# "make depends" first!

CONFIG = ../.configure
include $(CONFIG)

# Where to search for .mod files
M = -I. -I.. -I $(HOME)/progs/LR/lib/$(PLAT)/

# Where to search for libraries
L = $(HOME)/progs/LR/lib/$(PLAT)

# Where to build it
W = ./

# Extension for object files
O = o

# Where LR and Lex are installed
LR = $(HOME)/progs/LR/bin

# Where operational programs are installed
INSTALLDIR = $(HOME)/1401/progs/Capture/bin/

all: $(W)Capture

include ../Makefile.dep

$(W)Capture: $(OBJ) symbol_table.$O tree.$O $L/liblr.a
	$(FC) -o $(W)Capture $(LDOPTS) $(OBJ) $L/machine.o -L$L -llr

../Lexer_Table.f9h: ../Capture.lex
	$(LR)/lex ../Capture.lex ../Lexer_Table.f9h ../Capture_lex.lls

../Parser.f9h: ../Capture.grm
	$(LR)/lr ../Capture.grm ../Parser.f9h ../Capture.lls

../symbol_types.f9h: ../symbol_types.in
	$(LR)/GenSym ../symbol_types.in ../symbol_types.f9h

depends:
	( cd ..; \
        grep -i -e "^ *use " -e "^ *include " -e "^ *module" *.[Ff]90 | \
           sort | uniq | \
           MakeDep -b '$$(FC) -c $$(FOPTS) $$M' -e -p../ > \
           Makefile.dep )

install:
	cp Capture $(INSTALLDIR)

clean:
	rm -f Capture *.$O *.mod

# "$RCSfile: Make2,v $"
# "$Id: Make2,v 1.1 2022/01/24 22:11:37 vsnyder Exp $"

# $Log: Make2,v $
# Revision 1.1  2022/01/24 22:11:37  vsnyder
# Initial commit
#
