OpenCores
URL https://opencores.org/ocsvn/test_project/test_project/trunk

Subversion Repositories test_project

[/] [test_project/] [trunk/] [bench/] [sysc/] [src/] [Modules.make] - Blame information for rev 47

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 47 julius
# Make file for SystemC modules not associated directly with Verilator
2
#
3
# Copyright (C) 2009 Embecosm Limited
4
#
5
# Contributor Jeremy Bennett 
6
#
7
# This file is part of the cycle accurate model of the OpenRISC 1000 based
8
# system-on-chip, ORPSoC, built using Verilator.
9
#
10
# This program is free software; you can redistribute it and/or modify it
11
# under the terms of the GNU General Public License as published by the Free
12
# Software Foundation; either version 3 of the License, or (at your option)
13
# any later version.
14
#
15
# This program is distributed in the hope that it will be useful, but WITHOUT
16
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
18
# more details.
19
#
20
# You should have received a copy of the GNU General Public License along
21
# with this program.  If not, see . */
22
 
23
# The C/C++ parts of this program are commented throughout in a fashion
24
# suitable for processing with Doxygen.
25
 
26
# Tools and flags
27
ARFLAGS = rcs
28
#CXXFLAGS += $(OPT_FAST) $(OPT_SLOW) $(OPT) $(PROF_FLAGS)
29
CXX ?= g++
30
PROF_OPTS ?= -fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer
31
OPT_ALL ?= $(OPT_SLOW) $(OPT_FAST) $(OPT)
32
 
33
# Sub-directories
34
SYSC_INC_DIR = ../include
35
INCDIRS   = -I$(SYSTEMC)/include -I$(SYSC_INC_DIR)
36
 
37
# Local objects
38
OBJS = Or1200MonitorSC.o \
39
       ResetSC.o
40
LIB  = libmodules.a
41
 
42
# -----------------------------------------------------------------------------
43
# Rule to make dependency files
44
%.d: %.cpp
45
        @set -e; rm -f $@; \
46
                $(CXX) -MM $(CPPFLAGS) $(INCDIRS) $< > $@.$$$$; \
47
                sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
48
                rm -f $@.$$$$
49
 
50
# Rule to make object files
51
%.o: %.cpp
52
        $(CXX) $(CPPFLAGS) $(INCDIRS) $(CXXFLAGS) -c  $<
53
 
54
 
55
# -----------------------------------------------------------------------------
56
# Make the library
57
$(LIB): $(OBJS)
58
        $(AR) $(ARFLAGS) $@ $+
59
 
60
 
61
# -----------------------------------------------------------------------------
62
# Tidy up
63
.PHONY: clean
64
clean:
65
        $(RM) *.d *.d.*
66
        $(RM) *.o *.gcno *.gcda
67
        $(RM) $(LIB)
68
 
69
 
70
# -----------------------------------------------------------------------------
71
# More modest tidy up for branch profiling
72
.PHONY: prof-clean
73
prof-clean:
74
        $(RM) *.o
75
        $(RM) $(LIB)
76
 
77
 
78
# -----------------------------------------------------------------------------
79
# Include the dependency files
80
include $(OBJS:.o=.d)

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.