export LIBRARY.thread = thread.a

export SOURCES.thread	= \
	c_to_prolog.cc \
	choice.cc \
	environment.cc \
	esc_init.cc \
	execute.cc \
	foreign_interface.cc \
	generate_var_names.cc \
	instructions.cc \
	interrupt.cc \
	io.cc \
	pseudo_instr.cc \
	thread.cc \
	thread_condition.cc \
	thread_info.cc \
	trace.cc \
	trail.cc

export BASES.thread = $(basename $(SOURCES.thread))
export OBJECTS.thread = $(addsuffix .o,$(BASES.thread))

export GENERATED.thread = instructions.h instructions.cc

.PHONY: all.thread
all.thread:  $(LIBRARY.thread)

$(LIBRARY.thread): $(OBJECTS.thread)
	$(AR) $(ARFLAGS) $@ $(OBJECTS.thread)
	ranlib $@

##BLOCK##
instructions.h: execute.cc
	@command=/home/pjr/qp10.1/sys_bin/MkInstructions \
	source_file=$? \
	generated_file=$@ \
	options=h \
	/home/pjr/qp10.1/sys_bin/Update

instructions.cc: execute.cc
	@command=/home/pjr/qp10.1/sys_bin/MkInstructions \
	source_file=$? \
	generated_file=$@ \
	options=cc \
	/home/pjr/qp10.1/sys_bin/Update
##ENDBLOCK##

.PHONY: install.thread
install.thread: all.thread

.PHONY:	clean.thread
clean.thread:
	$(RM) $(OBJECTS.thread) $(LIBRARY.thread) Makefile.thread

##BLOCK##
.PHONY:	clobber.thread
clobber.thread: clean.thread
	$(RM) $(GENERATED.thread)

.PHONY: distclean.thread
distclean.thread: clobber.thread

.PHONY: depend.thread
depend.thread: $(SOURCES.thread) $(GENERATED.thread)
	$(CXX) $(CPPFLAGS) -MM $(SOURCES.thread) > Dependencies.thread

include Dependencies.thread
##ENDBLOCK##

