- Timestamp:
- Apr 5, 2007, 4:17:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest
r3 r15 7 7 # 8 8 9 #-----[ Variables]----------------------------------------9 #-----[ Directory ]---------------------------------------- 10 10 DIR_BIN = bin 11 11 DIR_LIB = ../lib 12 DIR_CFG = configuration 12 DIR_CFG_GEN = configuration_generated 13 DIR_CFG_USER = configuration 13 14 DIR_LOG = log 14 15 16 #-----[ Variables ]---------------------------------------- 15 17 CFG_FILE = configuration.cfg 16 18 17 19 OBJECTS = $(OBJECTS_COMMON) 18 20 19 EXEC_LOG = $(patsubst $(DIR_CFG)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG)/*.cfg)) 21 EXEC_PARAMS = $(SYSTEMC_EXEC_PARAMS_$(SIMULATOR)) 22 EXEC_LOG = $(patsubst $(DIR_CFG_GEN)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG_GEN)/*.cfg)) \ 23 $(patsubst $(DIR_CFG_USER)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG_USER)/*.cfg)) 20 24 EXEC = soft 21 25 … … 36 40 37 41 config_clean : 38 @ \ 39 declare NAME; \ 40 declare -i CPT=0; \ 41 declare -ai PERIOD; \ 42 declare -a RANGE_LOCAL; \ 43 PERIOD[0]=1; \ 44 \ 45 while $(READ) line; do \ 46 LINE=($$line); \ 47 \ 48 if $(TEST) $$CPT -eq 0; then \ 49 NAME=$${LINE[0]}; \ 50 else \ 51 RANGE_LOCAL=($$($(DIR_SCRIPT)/range.sh $${LINE[0]} $${LINE[1]} $${LINE[2]})); \ 52 PERIOD[$$CPT]=$$(($${PERIOD[$$(($$CPT-1))]}*$${#RANGE_LOCAL[*]})); \ 53 fi; \ 54 \ 55 CPT=$$(($$CPT+1)); \ 56 done < $(CFG_FILE); \ 57 \ 58 declare -i NB_CONFIG=$${PERIOD[$$(($$CPT-1))]}; \ 59 \ 60 for i in $$($(DIR_SCRIPT)/range.sh 0 $$(($$NB_CONFIG-1))); do \ 61 $(RM) "$(DIR_CFG)/$${NAME}_$${i}.cfg"; \ 62 done; 42 @$(RM) $(DIR_CFG_GEN) 63 43 64 config : 44 config : $(DIR_CFG_GEN) 65 45 @$(ECHO) "Generate configuration" 66 46 @ \ … … 110 90 x=$$(($$x/$${SIZE[$$j]})); \ 111 91 done; \ 112 $(ECHO) $${DATA[*]} > "$(DIR_CFG )/$${NAME}_$${i}.cfg"; \92 $(ECHO) $${DATA[*]} > "$(DIR_CFG_GEN)/$${NAME}_$${i}.cfg"; \ 113 93 $(ECHO) " - {$$i} $${DATA[*]}"; \ 114 94 done; 115 95 116 $(DIR_LOG)/%.exec.log : $(DIR_CFG )/%.cfg $(DIR_BIN)/$(EXEC).x96 $(DIR_LOG)/%.exec.log : $(DIR_CFG_GEN)/%.cfg $(DIR_BIN)/$(EXEC).x 117 97 @$(ECHO) "Execute : $*" 118 @$(EXPORT) SYSTEMC=$(SYSTEMC ) ; ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` > $@98 @$(EXPORT) SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` > $@ 119 99 declare -i count=`$(GREP) -ch "Test KO" $@`; \ 120 100 if $(TEST) $$count -eq 0; \ … … 125 105 $(DIR_BIN)/%.x : $(OBJECTS) $(HEADERS) $(DIR_LIB) 126 106 @$(ECHO) "Linkage : $*" 127 @$(CXX) $(LXX_OPT) -o $@ $(OBJECTS) $(LIBS)107 $(CXX) $(LFLAGS) -o $@ $(OBJECTS) $(LIBS) 128 108 129 109 $(DIR_BIN) : … … 135 115 @$(MKDIR) $@ 136 116 117 $(DIR_CFG_GEN) : 118 @$(ECHO) "Create directory : $@" 119 @$(MKDIR) $@ 120 137 121 selftest_clean_all : library_clean config_clean 138 122 139 123 selftest_clean : 140 124 @$(RM) $(DIR_LOG) \ 141 $(DIR_CFG )/*~\125 $(DIR_CFG_USER)/*~ \ 142 126 *.vhdl \ 143 127 *.stat \
Note: See TracChangeset
for help on using the changeset viewer.