1 # Copyright (c) 2015, University of Kaiserslautern
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
8 # 1. Redistributions of source code must retain the above copyright notice,
9 # this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
15 # 3. Neither the name of the copyright holder nor the names of its
16 # contributors may be used to endorse or promote products derived from
17 # this software without specific prior written permission.
19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
23 # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 # Authors: Matthias Jung
38 SYSTEMC_INC
= /opt
/systemc
/include
39 SYSTEMC_LIB
= /opt
/systemc
/lib-linux64
41 CXXFLAGS
= -I..
/..
/build
/$(ARCH
) -L..
/..
/build
/$(ARCH
)
42 CXXFLAGS
+= -I..
/systemc
/
43 CXXFLAGS
+= -I
$(SYSTEMC_INC
) -L
$(SYSTEMC_LIB
)
44 CXXFLAGS
+= -std
=c
++0x
46 CXXFLAGS
+= -DSC_INCLUDE_DYNAMIC_PROCESSES
-DDEBUG
-DTRACING_ON
48 LIBS
= -lgem5_
$(VARIANT
) -lsystemc
50 ALL
= gem5.
$(VARIANT
).sc
55 $(CXX
) $(CXXFLAGS
) -c
-o
$@
$<
57 sc_gem5_control.o
: ..
/systemc
/sc_gem5_control.
cc \
58 ..
/systemc
/sc_gem5_control.hh
59 sc_logger.o
: ..
/systemc
/sc_logger.
cc ..
/systemc
/sc_logger.hh
60 sc_module.o
: ..
/systemc
/sc_module.
cc ..
/systemc
/sc_module.hh
61 sc_mm.o
: sc_mm.
cc sc_mm.hh
62 sc_ext.o
: sc_ext.
cc sc_ext.hh
63 sc_port.o
: sc_port.
cc sc_port.hh
64 sc_target.o
: sc_target.
cc sc_target.hh
65 stats.o
: ..
/systemc
/stats.
cc ..
/systemc
/stats.hh
66 main.o
: main.
cc ..
/systemc
/sc_logger.hh ..
/systemc
/sc_module.hh \
69 gem5.
$(VARIANT
).sc
: main.o ..
/systemc
/stats.o ..
/systemc
/sc_gem5_control.o \
70 ..
/systemc
/sc_logger.o ..
/systemc
/sc_module.o sc_mm.o sc_ext.o sc_port.o sc_target.o
71 $(CXX
) $(CXXFLAGS
) -o
$@
$^
$(LIBS
)