CXXFLAGS += -g -O -MMD -I..
BINDIR = ../../bin
TARGETS = circtr 

all: $(TARGETS)

CIRCTR_OBJ = circtr.o  ../location.o ../bench_parser.o ../bench_import.o \
 ../edif_parser.o  ../edif_import.o  ../edif_err.o \
../lexan.o ../lexan_bench.o  ../lexan_edif.o ../symfunc.o ../export.o \
../trav.o ../dbg_export.o \
../err.o ../hub.o ../structural.o ../behavioral.o\
../indent.o ../named.o \
../vhdl/vhdl_export_trav.o ../vhdl/vhdl_export.o \
../vhdl/lexan_vhdl.o  ../vhdl/vhdl_err.o ../vhdl/vhdl_parser_struct.o \
../vhdl/vhdl_expressions.o  ../vhdl/vhdl_bison_parser.o ../vhdl/vhdl_parser.o \
../vhdl/vhdl_import.o 

circtr: $(CIRCTR_OBJ)
	$(CXX) -o circtr $(CIRCTR_OBJ)

../%.o: ../%.cc ../%.h
	$(MAKE) -C .. $(@F)


install: $(TARGETS)
	mv $(TARGETS) $(BINDIR)

clean:
	- rm *.o
	- rm *.d
	- rm *.exe
	- rm *.'$$$$$$'
	- rm *~
	- rm $(TARGETS)

depend:
	mv Makefile Makefile.bak
	sed -n 1,/[gG]ENERATED/p Makefile.bak > Makefile
	cat *.d >> Makefile
 
depclean:
	mv Makefile Makefile.bak
	sed -n 1,/[gG]ENERATED/p Makefile.bak > Makefile


# ----- GENERATED ----------------------------
