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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [src/] [Modules.make] - Blame information for rev 49

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

Line No. Rev Author Line
1 6 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 49 julius
 
30
ifdef VLT_CPPFLAGS
31
CXXFLAGS += $(VLT_CPPFLAGS)
32
endif
33
 
34 6 julius
CXX ?= g++
35 49 julius
#PROF_OPTS ?= -fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer -O3
36 6 julius
OPT_ALL ?= $(OPT_SLOW) $(OPT_FAST) $(OPT)
37
 
38
# Sub-directories
39
SYSC_INC_DIR = ../include
40
INCDIRS   = -I$(SYSTEMC)/include -I$(SYSC_INC_DIR)
41
 
42
# Local objects
43
OBJS = Or1200MonitorSC.o \
44
       ResetSC.o \
45
        UartSC.o
46
LIB  = libmodules.a
47
 
48 49 julius
ifdef VLT_DEBUG
49
CXXFLAGS += -g
50
endif
51
 
52 6 julius
# -----------------------------------------------------------------------------
53
# Rule to make dependency files
54
%.d: %.cpp
55
        @set -e; rm -f $@; \
56
                $(CXX) -MM $(CPPFLAGS) $(INCDIRS) $< > $@.$$$$; \
57
                sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
58
                rm -f $@.$$$$
59
 
60
# Rule to make object files
61
%.o: %.cpp
62 49 julius
        $(CXX) $(CPPFLAGS) $(PROF_OPTS) $(INCDIRS) $(CXXFLAGS) -c  $<
63 6 julius
 
64
 
65
# -----------------------------------------------------------------------------
66
# Make the library
67
$(LIB): $(OBJS)
68
        $(AR) $(ARFLAGS) $@ $+
69
 
70
 
71
# -----------------------------------------------------------------------------
72
# Tidy up
73
.PHONY: clean
74
clean:
75
        $(RM) *.d *.d.*
76
        $(RM) *.o *.gcno *.gcda
77
        $(RM) $(LIB)
78
 
79
 
80
# -----------------------------------------------------------------------------
81
# More modest tidy up for branch profiling
82
.PHONY: prof-clean
83
prof-clean:
84
        $(RM) *.o
85
        $(RM) $(LIB)
86
 
87
 
88
# -----------------------------------------------------------------------------
89
# Include the dependency files
90
include $(OBJS:.o=.d)

powered by: WebSVN 2.1.0

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