# ``The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved via the world wide web at http://www.erlang.org/.
# 
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
# 
# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
# AB. All Rights Reserved.''
# 
#     $Id$
#
include $(ERL_TOP)/make/target.mk

include $(ERL_TOP)/make/$(TARGET)/otp.mk

EBIN = .

# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------

MODULES= \
	after_SUITE \
	beam_SUITE \
	beam_literals_SUITE \
	big_SUITE \
	binary_SUITE \
	bs_construct_SUITE \
	bs_match_int_SUITE \
	bs_match_tail_SUITE \
	bs_match_misc_SUITE \
	busy_port_SUITE \
	call_trace_SUITE \
	code_SUITE \
	crypto_SUITE \
	ddll_SUITE \
	distribution_SUITE \
	driver_SUITE \
	efile_SUITE \
	erl_link_SUITE \
	evil_SUITE \
	exception_SUITE \
	float_SUITE \
	fun_SUITE \
	fun_r7_SUITE \
	gc_SUITE \
	guard_SUITE \
	hash_SUITE \
	list_bif_SUITE \
	match_spec_SUITE \
	monitor_SUITE \
	nested_SUITE \
	node_container_SUITE \
	num_bif_SUITE \
	op_SUITE \
	port_SUITE \
	port_bif_SUITE \
	process_SUITE \
	pseudoknot_SUITE \
	ref_SUITE \
	save_calls_SUITE \
	sl_alloc_SUITE \
	statistics_SUITE \
	time_SUITE \
	timer_bif_SUITE \
	trace_SUITE \
	trace_bif_SUITE \
	trace_port_SUITE \
	tuple_SUITE \
	trace_local_SUITE \
	trace_meta_SUITE \
	trace_call_count_SUITE \
	vector_SUITE

ERL_FILES= $(MODULES:%=%.erl)

TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR))

#
# This special rule can be removed in R9. Needed now because file_SUITE
# must be able to run in an R7B node.
#
$(EBIN)/fun_r7_SUITE.beam: fun_r7_SUITE.erl
	$(ERLC) +r7 $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) \
          -o$(EBIN) fun_r7_SUITE.erl

# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
RELSYSDIR = $(RELEASE_PATH)/emulator_test

# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_FLAGS += 
ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include

# ----------------------------------------------------
# Targets
# ----------------------------------------------------

tests debug opt: $(TARGET_FILES)

clean:
	rm -f $(TARGET_FILES)
	rm -f core *~

docs:

# ----------------------------------------------------
# Release Target
# ---------------------------------------------------- 
include $(ERL_TOP)/make/otp_release_targets.mk

release_spec:

release_tests_spec: opt
	$(INSTALL_DIR) $(RELSYSDIR)
	$(INSTALL_DATA) emulator.spec emulator.spec.vxworks $(ERL_FILES) \
		$(TARGET_FILES) $(RELSYSDIR)
	chmod -f -R u+w $(RELSYSDIR)
	tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xfBp -)

release_docs_spec:

