- Timestamp:
- Apr 14, 2009, 8:39:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common
r103 r113 22 22 endif 23 23 24 ##-----[ Entity ]------------------------------------------- 25 #ENTITY = $$($(BASENAME) $$PWD) 26 24 27 #-----[ Directory ]---------------------------------------- 25 28 #DIR_TMP = . … … 27 30 DIR_INC = include 28 31 DIR_SRC = src 29 DIR_OBJ = obj 32 DIR_OBJ = $(DIR_TMP)/obj 33 DIR_LIB = $(DIR_TMP)/lib 30 34 DIR_SCRIPT = $(MORPHEO_SCRIPT) 31 35 … … 35 39 -I$(DIR_MORPHEO) 36 40 37 LIBDIR = $(DIR_LIBRARY)\41 LIBDIR = -L$(DIR_LIB) \ 38 42 $(SYSTEMC_LIBDIR_$(SIMULATOR)) 39 43 # $(OR1K_LIBDIR) 40 41 LIBS = $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))42 43 # $(OR1K_LIBNAME) -lbfd44 44 45 45 FLAGS_COMMON = $(SYSTEMC_CFLAGS_$(SIMULATOR)) \ … … 50 50 51 51 #-----[ Variable ]----------------------------------------- 52 ENTITY = $$($(BASENAME) $$PWD)53 54 OBJECTS_COMMON = $( patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))52 #OBJECTS_COMMON = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp)) 53 SOURCES = $(wildcard $(DIR_SRC)/*.cpp) 54 OBJECTS_COMMON = $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(SOURCES))))) 55 55 56 56 HEADERS = $(wildcard $(DIR_INC)/*.h) 57 57 58 58 #-----[ Rules ]-------------------------------------------- 59 .PRECIOUS : $(DIR_OBJ)/ %.o59 .PRECIOUS : $(DIR_OBJ)/$(ENTITY)_%.o 60 60 61 61 test_env : 62 62 @$(ECHO) "-------------------| $(ENTITY)" 63 63 64 test : 65 @echo $(DIR_LIBRARY); 64 66 65 $(DIR_OBJ)/ %.o: $(DIR_SRC)/%.cpp $(HEADERS)67 $(DIR_OBJ)/$(ENTITY)_%.o : $(DIR_SRC)/%.cpp $(HEADERS) 66 68 @\ 67 69 $(ECHO) "Compilation : $*";\ 68 $( CXX) $(CFLAGS) -c -o $@ $<;70 $(SYSTEMC_CXX_$(SIMULATOR)) $(CFLAGS) -c -o $@ $<; 69 71 70 72 $(DIR_OBJ) : … … 76 78 @\ 77 79 $(ECHO) "Delete temporary files in directory $(PWD)";\ 78 $(RM) $(DIR_OBJ) \ 79 $(DIR_BIN) \ 80 *~ \ 81 $(DIR_SRC)/*~ \ 80 $(RM) $(OBJECTS_COMMON) \ 81 *~ \ 82 $(DIR_SRC)/*~ \ 82 83 $(DIR_INC)/*~; 83 84 84 85 common_clean_all : common_clean 86 @\ 87 $(RM) $(DIR_OBJ) 85 88 86 89 common_help :
Note: See TracChangeset
for help on using the changeset viewer.