-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile.def
210 lines (180 loc) · 9.01 KB
/
makefile.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
##############################################################################
# This file is part of 3D-ICE, version 3.1.0 . #
# #
# 3D-ICE is free software: you can redistribute it and/or modify it under #
# the terms of the GNU General Public License as published by the Free #
# Software Foundation, either version 3 of the License, or any later #
# version. #
# #
# 3D-ICE is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with 3D-ICE. If not, see <http://www.gnu.org/licenses/>. #
# #
# Copyright (C) 2021 #
# Embedded Systems Laboratory - Ecole Polytechnique Federale de Lausanne #
# All Rights Reserved. #
# #
# Authors: Arvind Sridhar Alessandro Vincenzi #
# Giseong Bak Martino Ruggiero #
# Thomas Brunschwiler Eder Zulian #
# Federico Terraneo Darong Huang #
# Luis Costero Marina Zapater #
# David Atienza #
# #
# For any comment, suggestion or request about 3D-ICE, please register and #
# write to the mailing list (see http://listes.epfl.ch/doc.cgi?liste=3d-ice) #
# Any usage of 3D-ICE for research, commercial or other purposes must be #
# properly acknowledged in the resulting products or publications. #
# #
# EPFL-STI-IEL-ESL Mail : [email protected] #
# Batiment ELG, ELG 130 (SUBSCRIPTION IS NECESSARY) #
# Station 11 #
# 1015 Lausanne, Switzerland Url : http://esl.epfl.ch/3d-ice #
##############################################################################
#
# Thermal Library variables
##############################################################################
3DICE_LIBNAME = threed-ice
3DICE_VERSION = 3.1.0
3DICE_RELEASE = $(3DICE_LIBNAME)-$(3DICE_VERSION)
3DICE_INCLUDE = $(3DICE_MAIN)/include
3DICE_FLEX = $(3DICE_MAIN)/flex
3DICE_BISON = $(3DICE_MAIN)/bison
3DICE_SOURCES = $(3DICE_MAIN)/sources
3DICE_LIB = $(3DICE_MAIN)/lib
3DICE_BIN = $(3DICE_MAIN)/bin
3DICE_DOC = $(3DICE_MAIN)/doc
3DICE_TEST = $(3DICE_MAIN)/test
3DICE_FLEX_L = $(3DICE_FLEX)/floorplan_scanner.l \
$(3DICE_FLEX)/layout_scanner.l \
$(3DICE_FLEX)/stack_description_scanner.l
3DICE_FLEX_C = $(3DICE_FLEX_L:.l=.c)
3DICE_FLEX_H = $(3DICE_FLEX_L:.l=.h)
3DICE_FLEX_O = $(3DICE_FLEX_L:.l=.o)
3DICE_FLEX_D = $(3DICE_FLEX_L:.l=.d)
3DICE_BISON_Y = $(3DICE_BISON)/floorplan_parser.y \
$(3DICE_BISON)/layout_parser.y \
$(3DICE_BISON)/stack_description_parser.y
3DICE_BISON_C = $(3DICE_BISON_Y:.y=.c)
3DICE_BISON_H = $(3DICE_BISON_Y:.y=.h)
3DICE_BISON_O = $(3DICE_BISON_Y:.y=.o)
3DICE_BISON_D = $(3DICE_BISON_Y:.y=.d)
3DICE_SOURCES_C = $(3DICE_SOURCES)/analysis.c \
$(3DICE_SOURCES)/channel.c \
$(3DICE_SOURCES)/coolant.c \
$(3DICE_SOURCES)/die.c \
$(3DICE_SOURCES)/die_list.c \
$(3DICE_SOURCES)/dimensions.c \
$(3DICE_SOURCES)/floorplan_element.c \
$(3DICE_SOURCES)/floorplan_element_list.c \
$(3DICE_SOURCES)/floorplan_file_parser.c \
$(3DICE_SOURCES)/floorplan_matrix.c \
$(3DICE_SOURCES)/floorplan.c \
$(3DICE_SOURCES)/heat_sink.c \
$(3DICE_SOURCES)/ic_element.c \
$(3DICE_SOURCES)/ic_element_list.c \
$(3DICE_SOURCES)/inspection_point.c \
$(3DICE_SOURCES)/inspection_point_list.c \
$(3DICE_SOURCES)/layer.c \
$(3DICE_SOURCES)/layer_list.c \
$(3DICE_SOURCES)/layout_file_parser.c \
$(3DICE_SOURCES)/material.c \
$(3DICE_SOURCES)/material_list.c \
$(3DICE_SOURCES)/material_element.c \
$(3DICE_SOURCES)/material_element_list.c \
$(3DICE_SOURCES)/network_message.c \
$(3DICE_SOURCES)/network_socket.c \
$(3DICE_SOURCES)/output.c \
$(3DICE_SOURCES)/power_grid.c \
$(3DICE_SOURCES)/powers_queue.c \
$(3DICE_SOURCES)/stack_description.c \
$(3DICE_SOURCES)/stack_element.c \
$(3DICE_SOURCES)/stack_element_list.c \
$(3DICE_SOURCES)/stack_file_parser.c \
$(3DICE_SOURCES)/system_matrix.c \
$(3DICE_SOURCES)/string_t.c \
$(3DICE_SOURCES)/thermal_data.c \
$(3DICE_SOURCES)/thermal_grid.c \
$(3DICE_SOURCES)/connection.c \
$(3DICE_SOURCES)/connection_list.c \
$(3DICE_SOURCES)/non_uniform_cell.c \
$(3DICE_SOURCES)/non_uniform_cell_list.c
ifeq ($(SYSTEMC_WRAPPER),y)
3DICE_SOURCES_CPP = $(3DICE_SOURCES)/IceWrapper.cpp
endif
3DICE_SOURCES_O = $(3DICE_SOURCES_C:.c=.o)
3DICE_SOURCES_O += $(3DICE_SOURCES_CPP:.cpp=.o)
3DICE_SOURCES_D = $(3DICE_SOURCES_C:.c=.d)
3DICE_LIB_A = $(3DICE_LIB)/lib$(3DICE_RELEASE).a
3DICE_LIB_O = $(3DICE_FLEX_O) $(3DICE_BISON_O) $(3DICE_SOURCES_O)
#
# SuperLU variables
##############################################################################
SLU_VERSION = 4.3
SLU_MAIN = $(3DICE_MAIN)/SuperLU_$(SLU_VERSION)
SLU_INCLUDE = $(SLU_MAIN)/SRC
SLU_LIB = $(SLU_MAIN)/lib
#SLU_LIBS = -L$(SLU_LIB) -lsuperlu_$(SLU_VERSION) -lblas
SLU_LIBS = -L$(SLU_LIB) -lsuperlu_$(SLU_VERSION) -L/usr/lib/x86_64-linux-gnu -lblas
#
# SystemC variables
##############################################################################
SYSTEMC_VERSION = 2.3.1
SYSTEMC_ARCH = linux
#SYSTEMC_ARCH = linux64
SYSTEMC_MAIN = $(HOME)/Libs/systemc-$(SYSTEMC_VERSION)
SYSTEMC_INCLUDE = $(SYSTEMC_MAIN)/include
SYSTEMC_LIB = $(SYSTEMC_MAIN)/lib-$(SYSTEMC_ARCH)
SYSTEMC_LIBS = -L$(SYSTEMC_LIB) -lsystemc
#
# Heatsink plugin variables
###############################################################################
HEATSINK_PLUGIN = $(3DICE_MAIN)/heatsink_plugin
#
# Commands and flags
##############################################################################
AR = ar
ARFLAGS = rsv
CC = gcc
# CC = g++
CFLAGS = -MD -O3
# CFLAGS = -MD -g -O0 -fsanitize=address
# CFLAGS = -MD -g -O0
CINCLUDES = -I$(3DICE_INCLUDE)
YACC = bison
YFLAGS = -d
# YFLAGS = -d --debug
LEX = flex
LFLAGS =
# LFLAGS = --debug
RM = rm
RMFLAGS = -vf
DOXYGEN = doxygen
DOXYFILE = Doxyfile
CXX = g++
CXXFLAGS = -std=c++11 -O2 -Wall -Wextra -Werror
# CXXFLAGS = -std=c++11 -g -O0 -fsanitize=address -Wall -Wextra -Werror
# CXXFLAGS = -std=c++11 -g -O0 -Wall -Wextra -Werror
INC_DIRS = $(CINCLUDES) -I$(SYSTEMC_INCLUDE)
#
# Pattern rules
##############################################################################
%.c: %.y
$(YACC) $(YFLAGS) $(notdir $<)
%.c: %.l
$(LEX) $(LFLAGS) $(notdir $<)
%.o : %.c
$(CC) $(CFLAGS) $(CINCLUDES) -c $< -o $@
@cp $*.d $*.dd
@sed -e 's/#.*//' \
-e 's/^[^:]*: *//' \
-e 's/ *\\$$//' \
-e '/^$$/ d' \
-e 's/$$/ :/' < $*.dd >> $*.d
@rm -f $*.dd
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INC_DIRS) -c $< -o $@