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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src-c/] [coremark_v1.0/] [Makefile] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 olivier.gi
#Author : Shay Gal-On, EEMBC
2
#
3
#This file is part of  EEMBC(R) and CoreMark(TM), which are Copyright (C) 2009
4
#All rights reserved.
5
#
6
#EEMBC CoreMark Software is a product of EEMBC and is provided under the terms of the
7
#CoreMark License that is distributed with the official EEMBC COREMARK Software release.
8
#If you received this EEMBC CoreMark Software without the accompanying CoreMark License,
9
#you must discontinue use and download the official release from www.coremark.org.
10
#
11
#Also, if you are publicly displaying scores generated from the EEMBC CoreMark software,
12
#make sure that you are in compliance with Run and Reporting rules specified in the accompanying readme.txt file.
13
#
14
#EEMBC
15
#4354 Town Center Blvd. Suite 114-200
16
#El Dorado Hills, CA, 95762
17
 
18
PORT_DIR=msp430
19
 
20
# Make sure the default target is to simply build and run the benchmark.
21
RSTAMP = v1.0
22
 
23
.PHONY: run score
24
run: $(OUTFILE) rerun score
25
 
26
score:
27
        @echo "Check run1.log and run2.log for results."
28
        @echo "See readme.txt for run and reporting rules."
29
 
30
ifndef PORT_DIR
31
# Ports for a couple of common self hosted platforms
32
UNAME=$(shell if [[ `uname 2> /dev/null` ]] ; then uname ; fi)
33
ifneq (,$(findstring CYGWIN,$(UNAME)))
34
PORT_DIR=cygwin
35
endif
36
ifneq (,$(findstring Linux,$(UNAME)))
37
MACHINE=$(shell uname -m)
38
ifneq (,$(findstring 64,$(MACHINE)))
39
PORT_DIR=linux64
40
else
41
PORT_DIR=linux
42
endif
43
endif
44
endif
45
ifndef PORT_DIR
46
$(error PLEASE define PORT_DIR! (e.g. make PORT_DIR=simple))
47
endif
48
vpath %.c $(PORT_DIR)
49
vpath %.h $(PORT_DIR)
50
vpath %.mak $(PORT_DIR)
51
include $(PORT_DIR)/core_portme.mak
52
 
53
ifndef ITERATIONS
54
ITERATIONS=0
55
endif
56
ifdef REBUILD
57
FORCE_REBUILD=force_rebuild
58
endif
59
 
60
CFLAGS += -DITERATIONS=$(ITERATIONS)
61
 
62
CORE_FILES = core_list_join core_main core_matrix core_state core_util
63
ORIG_SRCS = $(addsuffix .c,$(CORE_FILES))
64
SRCS = $(ORIG_SRCS) $(PORT_SRCS)
65
OBJS = $(addprefix $(OPATH),$(addsuffix $(OEXT),$(CORE_FILES)) $(PORT_OBJS))
66
OUTNAME = coremark_v1.0$(EXE)
67
OUTFILE = $(OPATH)$(OUTNAME)
68
LOUTCMD = $(OFLAG) $(OUTFILE) $(LFLAGS_END)
69
OUTCMD = $(OUTFLAG) $(OUTFILE) $(LFLAGS_END)
70
 
71
HEADERS = coremark.h
72
CHECK_FILES = $(ORIG_SRCS) $(HEADERS)
73
 
74
$(OPATH):
75
        $(MKDIR) $(OPATH)
76
 
77
.PHONY: compile link
78
ifdef SEPARATE_COMPILE
79
$(OPATH)$(PORT_DIR):
80
        $(MKDIR) $(OPATH)$(PORT_DIR)
81
 
82
compile: $(OPATH) $(OPATH)$(PORT_DIR) $(OBJS) $(HEADERS)
83
link: compile
84
        $(LD) $(LFLAGS) $(XLFLAGS) $(OBJS) $(LOUTCMD)
85
 
86
else
87
 
88
compile: $(OPATH) $(SRCS) $(HEADERS)
89
        $(CC) $(CFLAGS) $(XCFLAGS) $(SRCS) $(OUTCMD)
90
link: compile
91
        @echo "Link performed along with compile"
92
 
93
endif
94
 
95
$(OUTFILE): $(SRCS) $(HEADERS) Makefile core_portme.mak $(FORCE_REBUILD)
96
        $(MAKE) port_prebuild
97
        $(MAKE) link
98
        $(MAKE) port_postbuild
99
 
100
.PHONY: rerun
101
rerun:
102
        $(MAKE) XCFLAGS="$(XCFLAGS) -DPERFORMANCE_RUN=1" load run1.log
103
#       $(MAKE) XCFLAGS="$(XCFLAGS) -DVALIDATION_RUN=1" load run2.log
104
 
105
PARAM1=$(PORT_PARAMS) 0x0 0x0 0x66 $(ITERATIONS)
106
PARAM2=$(PORT_PARAMS) 0x3415 0x3415 0x66 $(ITERATIONS)
107
PARAM3=$(PORT_PARAMS) 8 8 8 $(ITERATIONS)
108
 
109
run1.log-PARAM=$(PARAM1) 7 1 2000
110
run2.log-PARAM=$(PARAM2) 7 1 2000
111
run3.log-PARAM=$(PARAM3) 7 1 1200
112
 
113
run1.log run2.log run3.log: load
114
        $(MAKE) port_prerun
115
        $(RUN) $(OUTFILE) $($(@)-PARAM) > $(OPATH)$@
116
        $(MAKE) port_postrun
117
 
118
.PHONY: gen_pgo_data
119
gen_pgo_data: run3.log
120
 
121
.PHONY: load
122
load: $(OUTFILE)
123
        $(MAKE) port_preload
124
        $(LOAD) $(OUTFILE)
125
        $(MAKE) port_postload
126
 
127
.PHONY: clean
128
clean:
129
        rm -f $(OUTFILE) $(OPATH)*.log *.info $(OPATH)index.html $(PORT_CLEAN)
130
 
131
.PHONY: force_rebuild
132
force_rebuild:
133
        echo "Forcing Rebuild"
134
 
135
.PHONY: check
136
check:
137
        md5sum -c coremark.md5
138
 
139
ifdef ETC
140
# Targets related to testing and releasing CoreMark. Not part of the general release!
141
include Makefile.internal
142
endif

powered by: WebSVN 2.1.0

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