Changeset 139 for trunk/Platforms/Test/Makefile
- Timestamp:
- Jul 30, 2010, 4:47:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platforms/Test/Makefile
r137 r139 48 48 PATH_INC = include 49 49 PATH_SRC = src 50 PATH_OBJ = $(MORPHEO_TMP)/obj 51 PATH_LIB = $(MORPHEO_PREFIX)/lib 52 PATH_BIN = $(MORPHEO_PREFIX)/bin 50 PATH_OBJ = $(MORPHEO_TMP)/obj/$(MORPHEO_TYPE) 51 PATH_LIB = $(MORPHEO_PREFIX)/lib/$(MORPHEO_TYPE) 52 PATH_BIN = $(MORPHEO_PREFIX)/bin/$(MORPHEO_TYPE) 53 53 PATH_LOG = $(MORPHEO_TMP)/log 54 54 PATH_GMON = $(MORPHEO_TMP)/gmon 55 55 PATH_DATA = ./data 56 PATH_DATA_CFG = $(PATH_DATA)/cfg 56 57 PATH_LOGS = $(patsubst $(PATH_DATA)/%,$(PATH_LOG)/%,$(wildcard $(PATH_DATA)/*)) 58 PATH_CFG_SUFFIX = IPs/systemC/processor/Morpheo/Files 59 PATH_CFG = $(MORPHEO_TOPLEVEL)/$(PATH_CFG_SUFFIX) 57 60 58 61 PATH_SOFT = $(MORPHEO_TOPLEVEL)/Softwares … … 80 83 BIN = Platforms_Test.x 81 84 EXEC = $(PATH_BIN)/$(BIN) 82 EXEC_PREFIX = $(NICE) -n $(PRIORITY) 85 EXEC_PREFIX = $(NICE) -n $(PRIORITY) 83 86 #$(VALGRIND) 84 87 EXEC_PARAMS = $(SYSTEMC_EXEC_PARAMS_$(SIMULATOR_SYSTEMC)) … … 125 128 $(PATH_BIN)/%.x : $(PATH_OBJ) $(PATH_BIN) 126 129 @\ 127 $(ECHO) "Linkage : $*";\128 130 case "${SIMULATOR_SYSTEMC}" in \ 129 131 "modelsim") \ … … 139 141 *) \ 140 142 $(MAKE) $(OBJECTS); \ 143 $(ECHO) "Linkage : $*"; \ 141 144 $(CXX) $(PLATFORMS_L_FLAGS) -o $@ $(OBJECTS) $(LIBNAME); \ 142 145 ;; \ … … 149 152 $(RM) $(PATH_LOG)/$(DATA); \ 150 153 fi; \ 151 declare logs="$(LOGS)"; \ 152 $(MAKE) $${logs}; \ 153 declare -i nb_test=0; \ 154 declare -a logs=($(LOGS)); \ 155 declare -i nb_test=$${#logs[*]}; \ 156 $(ECHO) "-------------------| Run $${nb_test} test(s)"; \ 157 $(MAKE) $${logs[*]}; \ 154 158 declare -i nb_test_ko=0; \ 155 for log in $${logs }; do\159 for log in $${logs[*]}; do \ 156 160 $(GREP) -q "Test OK" $$log; \ 157 161 declare -i test_ok=$$?; \ … … 161 165 then nb_test_ko=$$(($${nb_test_ko} + 1)); \ 162 166 fi; \ 163 nb_test=$$(($${nb_test} + 1)); \164 167 done; \ 165 168 if $(TEST) $${nb_test_ko} -ne 0; \ … … 184 187 for log in $(LOGS); do \ 185 188 $(ECHO) -n "."; \ 186 $(ECHO) -n " cd $(MORPHEO_TOPLEVEL); source environment.sh; cd -; path=\"${PWD}\"; " >> $(SCRIPT);\189 $(ECHO) -n "source $(MORPHEO_TOPLEVEL)/environment.sh $(MORPHEO_LOCALIZATION); path=\"${PWD}\"; " >> $(SCRIPT);\ 187 190 if $(TEST) $(CLEAN) -ne 0; then \ 188 191 $(ECHO) -n "$(RM) $${log}; " >> $(SCRIPT); \ … … 201 204 $(ECHO) "Run : $*"; \ 202 205 \ 203 file_gmon= $$($(BASENAME) $*);\204 dir_gmon= $$($(DIRNAME) $*); \206 file_gmon="$$($(BASENAME) $*)-$$($(DATE))"; \ 207 dir_gmon="$$($(DIRNAME) $*)"; \ 205 208 $(MKDIR) $(PATH_GMON)/$$dir_gmon; \ 206 209 export GMON_OUT_PREFIX=$(PATH_GMON)/$$dir_gmon/$$file_gmon;\ … … 219 222 echo "{$$($(date))} $* $${test} $${timing}" >> $$($(DIRNAME) $*).res;\ 220 223 224 cfg : $(PATH_DATA_CFG) 225 @\ 226 $(ECHO) "Create configuration file"; \ 227 for file_cfg in $(PATH_CFG)/*.cfg; do \ 228 file_data=$(PATH_DATA_CFG)/$$($(BASENAME) $${file_cfg}); \ 229 $(ECHO) " * $${file_data}"; \ 230 $(ECHO) '$${MORPHEO_TOPLEVEL}'"/$(PATH_CFG_SUFFIX)/debug.sim" > $${file_data}; \ 231 $(ECHO) '$${MORPHEO_TOPLEVEL}'"/$(PATH_CFG_SUFFIX)/Morpheo.gen" >> $${file_data}; \ 232 $(ECHO) '$${MORPHEO_TOPLEVEL}'"/$(PATH_CFG_SUFFIX)/$$($(BASENAME) $${file_cfg})" >> $${file_data}; \ 233 $(ECHO) '$${MORPHEO_TOPLEVEL}'"/Softwares/Test/Test_x000/bin/soft_NEWLIB_MORPHEO.x" >> $${file_data}; \ 234 $(ECHO) "0" >> $${file_data}; \ 235 $(ECHO) "0" >> $${file_data}; \ 236 $(ECHO) "4096" >> $${file_data}; \ 237 $(ECHO) "2" >> $${file_data}; \ 238 done; 239 221 240 #-----[ Library + Software ]------------------------------- 222 241 … … 240 259 $(CXX) $(PLATFORMS_CXX_FLAGS) -c -o $@ $<; 241 260 242 $(PATH_OBJ) $(PATH_BIN) $(PATH_LOGS) $(PATH_GMON) :261 $(PATH_OBJ) $(PATH_BIN) $(PATH_LOGS) $(PATH_GMON) $(PATH_DATA_CFG) : 243 262 @\ 244 263 $(ECHO) "Create directory : $@";\ … … 251 270 $(ECHO) "Delete temporary files in directory $(PWD)";\ 252 271 $(RM) $(OBJECTS);\ 253 $(RM) $(EXEC);\254 272 $(RM) $(PATH_LOGS); \ 255 273 $(RM) $(PATH_GMON); \ … … 286 304 $(ECHO) " * bench : cf 'make run DATA=bench'";\ 287 305 $(ECHO) " * distexe : Generate an command file to distexe. It's as run command, but just generate an script with all make";\ 306 $(ECHO) " * cfg : For each configuration in \"${PATH_CFG}\", create basic test";\ 288 307 $(ECHO) " * lib : make library";\ 289 308 $(ECHO) " * soft : make software";\
Note: See TracChangeset
for help on using the changeset viewer.