Changeset 113 for trunk/Platforms/Test/Makefile
- Timestamp:
- Apr 14, 2009, 8:39:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platforms/Test/Makefile
r109 r113 29 29 #---------------------------------------------------------- 30 30 ENTITY = Test 31 SIMULATOR = modelsim 31 32 32 33 DIR_TMP = $(MORPHEO_TMP) … … 34 35 DIR_SRC = src 35 36 DIR_OBJ = $(DIR_TMP)/obj 37 DIR_LIB = $(DIR_TMP)/lib 36 38 DIR_BIN = $(DIR_TMP)/bin 37 39 DIR_LOG = $(DIR_TMP)/log … … 57 59 #---------------------------------------------------------- 58 60 59 OBJECTS = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp)) 61 SOURCES = $(wildcard $(DIR_SRC)/*.cpp) 62 OBJECTS = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(SOURCES)) 60 63 LOGS = $(patsubst $(DIR_DATA_TEST)/%.cfg,$(DIR_LOG)/%.log,$(wildcard $(DIR_DATA_TEST)/*.cfg)) 61 64 BENCHS = $(patsubst $(DIR_DATA_BENCH)/%.cfg,$(DIR_LOG)/%.log,$(wildcard $(DIR_DATA_BENCH)/*.cfg)) … … 73 76 -I$(DIR_INC) 74 77 78 #LIBDIR = $(SYSTEMC_LIBDIR_$(SIMULATOR)) \ 79 # $(ENVIRONMENT_LIBDIR) \ 80 # $(MORPHEO_LIBDIR) 81 82 # FIXME !!! 75 83 LIBDIR = $(SYSTEMC_LIBDIR_$(SIMULATOR)) \ 76 $(ENVIRONMENT_LIBDIR) \ 77 $(MORPHEO_LIBDIR) 84 -L$(DIR_LIB) 78 85 79 86 LIBNAME = $(ENVIRONMENT_LIBNAME) \ … … 99 106 .PRECIOUS : $(DIR_OBJ)/%.o $(DIR_BIN)/%.x $(DIR_LOG)/%.log 100 107 101 all : $(DIR_OBJ) $(DIR_BIN) 102 @\ 103 $(MAKE) $(EXEC) 104 105 $(DIR_BIN)/%.x : $(OBJECTS) 106 @\ 107 $(ECHO) "Compilation : $*";\ 108 $(CXX) $(PLATFORMS_L_FLAGS) -o $@ $^ $(LIBNAME); 108 all : $(EXEC) 109 110 $(DIR_BIN)/%.x : $(DIR_OBJ) $(DIR_BIN) 111 @\ 112 $(ECHO) "Linkage : $*";\ 113 case "${SIMULATOR}" in \ 114 "modelsim") \ 115 $(MAKE) $(WORK_NAME); \ 116 $(MODELTECH_SCCOM) $(PLATFORMS_CXX_FLAGS) $(SOURCES); \ 117 $(MODELTECH_SCCOM) -link $(PLATFORMS_L_FLAGS) $(LIBNAME); \ 118 $(ECHO) "#!$(SHELL)" > $@; \ 119 $(ECHO) "cd $${PWD};" >> $@; \ 120 $(ECHO) "$(MODELTECH_VSIM) -sc_arg "'"$${*}"'" $(WORK_NAME).top;" >> $@;\ 121 $(ECHO) "cd -;" >> $@; \ 122 $(CHMOD) +x $@; \ 123 ;; \ 124 *) \ 125 $(MAKE) $(OBJECTS); \ 126 $(CXX) $(PLATFORMS_L_FLAGS) -o $@ $(OBJECTS) $(LIBNAME); \ 127 ;; \ 128 esac; \ 129 109 130 110 131 test : $(DIR_LOG) all … … 141 162 execute : bench 142 163 164 # $(ECHO) $${data} | $(EXEC_PREFIX) $(EXEC) &> $$log; \ 165 143 166 $(DIR_LOG)/%.log : %.cfg 144 167 @\ … … 158 181 fi; \ 159 182 160 161 183 #-----[ Library + Software ]------------------------------- 162 184 … … 177 199 $(CXX) $(PLATFORMS_CXX_FLAGS) -c -o $@ $<; 178 200 179 $(DIR_OBJ) 201 $(DIR_OBJ) $(DIR_BIN) $(DIR_LOG) : 180 202 @\ 181 203 $(ECHO) "Create directory : $@";\ 182 204 $(MKDIR) $@ 183 205 184 $(DIR_BIN) :185 @\186 $(ECHO) "Create directory : $@";\187 $(MKDIR) $@188 189 $(DIR_LOG) :190 @\191 $(ECHO) "Create directory : $@";\192 $(MKDIR) $@193 194 206 #-----[ Clean + help ]------------------------------------- 195 207 … … 197 209 @\ 198 210 $(ECHO) "Delete temporary files in directory $(PWD)";\ 199 $(RM) *~ $(DIR_SRC)/*~ $(DIR_INC)/*~ $(DIR_DATA_TEST)/*~ $(DIR_DATA_BENCH)/*~ *core* tty* *.vhdl *.log *.stat *.pos\ 200 $(DIR_OBJ) $(DIR_BIN) $(DIR_LOG); 211 $(RM) $(OBJECTS) $(EXEC) \ 212 *~ $(DIR_SRC)/*~ $(DIR_INC)/*~ $(DIR_DATA_TEST)/*~ $(DIR_DATA_BENCH)/*~ \ 213 *core* \ 214 tty* \ 215 *.vhdl \ 216 *.log \ 217 *.stat \ 218 *.pos \ 219 modelsim.ini transcript *wlf* $(WORK_NAME) 201 220 202 221 clean_all : clean 203 222 @\ 204 223 $(ECHO) "Delete generated files in directory $(PWD)";\ 224 $(RM) $(DIR_OBJ) $(DIR_BIN) $(DIR_LOG);\ 205 225 $(MAKE) --directory=$(DIR_SOFT) --makefile=Makefile clean_all; \ 206 226 $(MAKE) --directory=$(ENVIRONMENT_DIR) --makefile=Makefile clean_all; \ … … 223 243 $(ECHO) ""; 224 244 245 include $(MORPHEO_TOPLEVEL)/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis 225 246 include $(MORPHEO_TOPLEVEL)/IPs/systemC/processor/Morpheo/Makefile.deps 226 247 include $(MORPHEO_TOPLEVEL)/IPs/systemC/Environment/Makefile.deps
Note: See TracChangeset
for help on using the changeset viewer.