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

Subversion Repositories openrisc

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

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
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
        UartSC.o
41
LIB  = libmodules.a
42
 
43
# -----------------------------------------------------------------------------
44
# Rule to make dependency files
45
%.d: %.cpp
46
        @set -e; rm -f $@; \
47
                $(CXX) -MM $(CPPFLAGS) $(INCDIRS) $< > $@.$$$$; \
48
                sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
49
                rm -f $@.$$$$
50
 
51
# Rule to make object files
52
%.o: %.cpp
53
        $(CXX) $(CPPFLAGS) $(INCDIRS) $(CXXFLAGS) -c  $<
54
 
55
 
56
# -----------------------------------------------------------------------------
57
# Make the library
58
$(LIB): $(OBJS)
59
        $(AR) $(ARFLAGS) $@ $+
60
 
61
 
62
# -----------------------------------------------------------------------------
63
# Tidy up
64
.PHONY: clean
65
clean:
66
        $(RM) *.d *.d.*
67
        $(RM) *.o *.gcno *.gcda
68
        $(RM) $(LIB)
69
 
70
 
71
# -----------------------------------------------------------------------------
72
# More modest tidy up for branch profiling
73
.PHONY: prof-clean
74
prof-clean:
75
        $(RM) *.o
76
        $(RM) $(LIB)
77
 
78
 
79
# -----------------------------------------------------------------------------
80
# Include the dependency files
81
include $(OBJS:.o=.d)

powered by: WebSVN 2.1.0

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