1## ****************************************************************************
2##
3##  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4##  more contributor license agreements.  See the NOTICE file distributed
5##  with this work for additional information regarding copyright ownership.
6##  Accellera licenses this file to you under the Apache License, Version 2.0
7##  (the "License"); you may not use this file except in compliance with the
8##  License.  You may obtain a copy of the License at
9##
10##   http://www.apache.org/licenses/LICENSE-2.0
11##
12##  Unless required by applicable law or agreed to in writing, software
13##  distributed under the License is distributed on an "AS IS" BASIS,
14##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15##  implied.  See the License for the specific language governing
16##  permissions and limitations under the License.
17##
18## ****************************************************************************
19##
20##  Makefile.am --
21##  Process this file with automake to produce a Makefile.in file.
22##
23##  Original Author: Alan Fitch, Doulos, 2012-03-10
24##
25## ****************************************************************************
26##
27##  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
28##  changes you are making here.
29##
30##      Name, Affiliation, Date: Philipp Hartmann, OFFIS, 2013-05-20
31##  Description of Modification: Rewritten for (mostly) non-recursive build.
32##
33## ****************************************************************************
34
35include $(top_srcdir)/config/Make-rules.examples
36
37# override package string for TLM tests
38PACKAGE_STRING = "TLM $(TLM_PACKAGE_VERSION)"
39
40SUBDIRS = \
41	common \
42	.
43
44all:
45	@echo "To compile and run the examples type"
46	@echo "   make check "
47
48## use a wrapper script to check expected outputs
49TESTS = $(check_SCRIPTS)
50check_SCRIPTS  = $(examples_TESTS:=.sh)
51check_PROGRAMS = $(examples_TESTS)
52
53## ************************************************************************
54## additional data for installation
55
56tlmexamplesdir = $(examplesdir)/tlm
57
58examples_FILES = \
59	README.txt
60
61## ************************************************************************
62
63TLM_EXAMPLE_SUBDIRS = {build-msvc,build-unix,docs,include,src,results,}
64
65## shared build setup for TLM examples
66CPPFLAGS_TLMTESTS = -I$(srcdir)/common/include $(AM_CPPFLAGS)
67LDADD            += common/libtlm20examples.la
68
69examples_INPUT =results/input.txt
70examples_GOLDEN=results/expected.log
71
72## filled later
73examples_BUILD =
74examples_CLEAN =
75examples_TESTS =
76examples_DIRS  =
77
78##
79## list of TLM examples
80##
81
82include at_1_phase/test.am
83include at_2_phase/test.am
84include at_4_phase/test.am
85include at_extension_optional/test.am
86include at_mixed_targets/test.am
87include at_ooo/test.am
88include lt/test.am
89include lt_dmi/test.am
90include lt_extension_mandatory/test.am
91include lt_mixed_endian/test.am
92include lt_temporal_decouple/test.am
93
94examples_DIRS += common/include/models
95examples_DIRS += common/include
96examples_DIRS += common/src
97examples_DIRS += common
98
99## ************************************************************************
100
101# install examples?
102if SEPARATE_INSTALL_TREE
103nobase_tlmexamples_DATA = \
104	$(examples_FILES)
105
106uninstall-hook:
107	test ! -d "$(tlmexamplesdir)" || ( set -e ; cd "$(tlmexamplesdir)" ; \
108	  for dir in $(examples_DIRS) ; do test ! -d $$dir || rmdir $$dir ; done ; \
109	  cd - ; rmdir "$(tlmexamplesdir)" )
110
111endif # SEPARATE_INSTALL_TREE
112
113EXTRA_DIST += \
114	$(examples_FILES) \
115	CMakeLists.txt
116
117CLEANFILES += \
118	$(examples_CLEAN) \
119	$(check_SCRIPTS)
120
121## Taf!
122