Changeset 113 for trunk/IPs/systemC/Environment
- Timestamp:
- Apr 14, 2009, 8:39:12 PM (16 years ago)
- Location:
- trunk/IPs/systemC/Environment
- Files:
-
- 8 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Cache/Makefile
r88 r113 1 #-----[ Directory ]----------------------------------------2 3 DIR_QUEUE = ../Queue4 5 #-----[ Variable ]-----------------------------------------6 7 ENTITY ?= Cache8 9 OBJECTS_DEPS = $(patsubst $(DIR_QUEUE)/$(DIR_SRC)/%.cpp,$(DIR_QUEUE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_QUEUE)/$(DIR_SRC)/*.cpp))10 11 1 #-----[ Rules ]-------------------------------------------- 12 2 … … 26 16 @$(MAKE) environment_help 27 17 28 include ../Makefile.Environment 18 include Makefile.defs 19 include $(DIR_ENVIRONMENT)/Makefile.Environment -
trunk/IPs/systemC/Environment/Data/Makefile
r88 r113 1 #-----[ Directory ]----------------------------------------2 3 # DIR_ENDIANNESS = ../Endianness4 5 #-----[ Variable ]-----------------------------------------6 7 ENTITY ?= Data8 9 # OBJECTS_DEPS = $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))10 11 1 #-----[ Rules ]-------------------------------------------- 12 2 13 3 all : 14 @\ 15 $(MAKE) all_environment 16 17 # $(MAKE) --directory=$(DIR_ENDIANNESS) all; \ 4 @$(MAKE) all_environment 18 5 19 6 clean : 20 @\ 21 $(MAKE) environment_clean 22 23 # $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \ 7 @$(MAKE) environment_clean 24 8 25 9 clean_all : clean … … 28 12 @$(MAKE) environment_help 29 13 30 include ../Makefile.Environment 14 include Makefile.defs 15 include $(DIR_ENVIRONMENT)/Makefile.Environment -
trunk/IPs/systemC/Environment/Endianness/Makefile
r88 r113 1 #-----[ Directory ]----------------------------------------2 3 #-----[ Variable ]-----------------------------------------4 5 ENTITY ?= Endianness6 7 #OBJECTS_DEPS =8 9 1 #-----[ Rules ]-------------------------------------------- 10 2 … … 22 14 @$(MAKE) environment_help 23 15 24 include ../Makefile.Environment 16 include Makefile.defs 17 include $(DIR_ENVIRONMENT)/Makefile.Environment -
trunk/IPs/systemC/Environment/Makefile
r88 r113 1 ifeq ($(origin MORPHEO_TMP), undefined) 2 $(error "variable MORPHEO_TMP is undefined"); 3 endif 4 1 5 #-----[ Directory ]---------------------------------------- 6 DIR_LIB = $(DIR_TMP)/lib 7 DIR_ENVIRONMENT = . 8 DIR_CACHE = Cache 9 DIR_DATA = Data 10 DIR_ENDIANNESS = Endianness 11 DIR_QUEUE = Queue 12 DIR_RAMLOCK = RamLock 13 DIR_SIM2OS = Sim2OS 14 DIR_TTY = TTY 2 15 3 DIR_LIB = ./lib 4 DIR_CACHE = ./Cache 5 DIR_DATA = ./Data 6 DIR_ENDIANNESS = ./Endianness 7 DIR_QUEUE = ./Queue 8 DIR_RAMLOCK = ./RamLock 9 DIR_SIM2OS = ./Sim2OS 10 DIR_TTY = ./TTY 16 include $(DIR_CACHE)/Makefile.defs 17 include $(DIR_DATA)/Makefile.defs 18 include $(DIR_ENDIANNESS)/Makefile.defs 19 include $(DIR_QUEUE)/Makefile.defs 20 include $(DIR_RAMLOCK)/Makefile.defs 21 include $(DIR_SIM2OS)/Makefile.defs 22 include $(DIR_TTY)/Makefile.defs 11 23 12 24 #-----[ Variable ]----------------------------------------- 13 ENTITY ?= Environment14 25 15 LIBRARY_NAME= Environment16 LIBRARY_FILE = $(DIR_LIB)/lib$(LIBRARY_NAME).a 26 ENTITY := Environment 27 DIR_SRC = $(DIR_ENVIRONMENT)/src 17 28 18 OBJECTS_DEPS = $(patsubst $(DIR_CACHE)/$(DIR_SRC)/%.cpp,$(DIR_CACHE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_CACHE)/$(DIR_SRC)/*.cpp)) \ 19 $(patsubst $(DIR_DATA)/$(DIR_SRC)/%.cpp,$(DIR_DATA)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_DATA)/$(DIR_SRC)/*.cpp)) \ 20 $(patsubst $(DIR_DATA)/$(DIR_SRC)/%.c,$(DIR_DATA)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_DATA)/$(DIR_SRC)/*.c)) \ 21 $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp)) \ 22 $(patsubst $(DIR_QUEUE)/$(DIR_SRC)/%.cpp,$(DIR_QUEUE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_QUEUE)/$(DIR_SRC)/*.cpp)) \ 23 $(patsubst $(DIR_RAMLOCK)/$(DIR_SRC)/%.cpp,$(DIR_RAMLOCK)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_RAMLOCK)/$(DIR_SRC)/*.cpp)) \ 24 $(patsubst $(DIR_SIM2OS)/$(DIR_SRC)/%.cpp,$(DIR_SIM2OS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_SIM2OS)/$(DIR_SRC)/*.cpp)) \ 25 $(patsubst $(DIR_TTY)/$(DIR_SRC)/%.cpp,$(DIR_TTY)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_TTY)/$(DIR_SRC)/*.cpp)) 29 include $(DIR_ENVIRONMENT)/Makefile.defs 26 30 31 LIBRARY_NAME := $(ENTITY) 32 LIBRARY_FILE := $(DIR_LIB)/lib$(LIBRARY_NAME).a 33 34 Environment_OBJECTS_DEPS := $(OBJECTS) \ 35 $(Cache_OBJECTS_DEPS) \ 36 $(Data_OBJECTS_DEPS) \ 37 $(Endianness_OBJECTS_DEPS) \ 38 $(Queue_OBJECTS_DEPS) \ 39 $(RamLock_OBJECTS_DEPS) \ 40 $(Sim2OS_OBJECTS_DEPS) \ 41 $(TTY_OBJECTS_DEPS) 27 42 28 43 #-----[ Rules ]-------------------------------------------- 29 44 30 all : a b c d e f g45 all : 31 46 @\ 32 47 $(MAKE) all_environment; \ 48 $(MAKE) --directory=$(DIR_CACHE) all; \ 49 $(MAKE) --directory=$(DIR_DATA) all; \ 50 $(MAKE) --directory=$(DIR_ENDIANNESS) all; \ 51 $(MAKE) --directory=$(DIR_QUEUE) all; \ 52 $(MAKE) --directory=$(DIR_RAMLOCK) all; \ 53 $(MAKE) --directory=$(DIR_SIM2OS) all; \ 54 $(MAKE) --directory=$(DIR_TTY) all; \ 33 55 $(MAKE) $(LIBRARY_FILE); 34 56 35 a :36 @\37 $(MAKE) --directory=$(DIR_CACHE) all;38 57 39 b : 40 @\ 41 $(MAKE) --directory=$(DIR_DATA) all; 42 43 c : 44 @\ 45 $(MAKE) --directory=$(DIR_ENDIANNESS) all; 46 47 d : 48 @\ 49 $(MAKE) --directory=$(DIR_QUEUE) all; 50 51 e : 52 @\ 53 $(MAKE) --directory=$(DIR_RAMLOCK) all; 54 55 f : 56 @\ 57 $(MAKE) --directory=$(DIR_SIM2OS) all; 58 59 g : 60 @\ 61 $(MAKE) --directory=$(DIR_TTY) all; 62 63 64 $(LIBRARY_FILE) : $(OBJECTS_DEPS) $(OBJECTS) $(DIR_LIB) 58 $(LIBRARY_FILE) : $(Environment_OBJECTS_DEPS) 65 59 @\ 66 60 $(ECHO) "Archive : $@";\ 67 $(AR) -r $@ $(OBJECTS_DEPS) $(OBJECTS);\ 61 $(ECHO) "Archive : $@";\ 62 $(MKDIR) $(DIR_LIB);\ 63 $(AR) -r $@ $(Environment_OBJECTS_DEPS);\ 68 64 $(RANLIB) $@; 69 65 … … 71 67 @\ 72 68 $(ECHO) "Create directory : $@";\ 73 $(MKDIR) $@ ;69 $(MKDIR) $@ 74 70 75 71 exe_all : 76 72 @\ 73 $(MAKE) --directory=$(DIR_CACHE) clean; \ 77 74 $(MAKE) --directory=$(DIR_CACHE) exe; \ 75 $(MAKE) --directory=$(DIR_DATA) clean; \ 78 76 $(MAKE) --directory=$(DIR_DATA) exe; \ 77 $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \ 79 78 $(MAKE) --directory=$(DIR_ENDIANNESS) exe; \ 79 $(MAKE) --directory=$(DIR_QUEUE) clean; \ 80 80 $(MAKE) --directory=$(DIR_QUEUE) exe; \ 81 $(MAKE) --directory=$(DIR_RAMLOCK) clean; \ 81 82 $(MAKE) --directory=$(DIR_RAMLOCK) exe; \ 83 $(MAKE) --directory=$(DIR_SIM2OS) clean; \ 82 84 $(MAKE) --directory=$(DIR_SIM2OS) exe; \ 85 $(MAKE) --directory=$(DIR_TTY) clean; \ 83 86 $(MAKE) --directory=$(DIR_TTY) exe; \ 84 $(MAKE) exe; \ 87 $(MAKE) clean; \ 88 $(MAKE) exe; 85 89 86 90 clean : -
trunk/IPs/systemC/Environment/Makefile.Environment
r88 r113 1 ifeq ($(origin MORPHEO_TOPLEVEL), undefined) 2 $(error "variable MORPHEO_TOPLEVEL is undefined"); 3 else 4 include $(MORPHEO_TOPLEVEL)/Makefile.tools 5 include $(MORPHEO_TOPLEVEL)/Makefile.flags 6 endif 7 8 #-----[ Directory ]---------------------------------------- 9 ENTITY ?= Environment 10 11 DIR_TMP = $(MORPHEO_TMP)/$(ENTITY) 12 DIR_TST = ./selftest 13 DIR_INC = ./include 14 DIR_SRC = ./src 15 DIR_OBJ = ./obj 16 DIR_BIN = $(DIR_TMP)/bin 17 18 #-----[ Compilation ]-------------------------------------- 19 INCDIR = $(SYSTEMC_INCDIR_$(SIMULATOR)) \ 20 -I$(DIR_INC) \ 21 -I../processor/Morpheo 22 23 LIBDIR = $(SYSTEMC_LIBDIR_$(SIMULATOR)) 24 25 LIBNAME = -lbfd \ 26 -liberty \ 27 $(SYSTEMC_LIBNAME_$(SIMULATOR)) 28 29 FLAGS = $(SYSTEMC_CFLAGS_$(SIMULATOR)) 30 31 MORPHEO_CC_FLAGS = $(MORPHEO_FLAGS) $(CC_FLAGS) $(INCDIR) 32 MORPHEO_CXX_FLAGS = $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(INCDIR) 33 MORPHEO_L_FLAGS = $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(LIBDIR) 34 35 #-----[ Variable ]----------------------------------------- 36 37 OBJECTS = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp)) \ 38 $(patsubst $(DIR_SRC)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.c)) 39 OBJECTS_BIN = $(patsubst $(DIR_TST)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_TST)/*.cpp)) 40 41 HEADERS = $(wildcard $(DIR_INC)/*.h) 42 43 EXE = $(DIR_BIN)/soft.x 44 45 EXEC_PREFIX = 46 #$(VALGRIND) 1 include Makefile.defs 47 2 48 3 #-----[ Rules ]-------------------------------------------- … … 53 8 vpath %.o $(DIR_OBJ) 54 9 55 .PRECIOUS : $(DIR_OBJ)/ %.o $(DIR_BIN)/%.x10 .PRECIOUS : $(DIR_OBJ)/$(ENTITY)_%.o $(DIR_BIN)/%.x 56 11 57 12 test_env : … … 59 14 $(ECHO) "-------------------| $(ENTITY)" 60 15 61 $(DIR_OBJ)/ %.o: %.cpp $(HEADERS)16 $(DIR_OBJ)/$(ENTITY)_%.o : %.cpp $(HEADERS) 62 17 @\ 63 18 $(ECHO) "Compilation : $*";\ 64 19 $(CXX) $(MORPHEO_CXX_FLAGS) -c -o $@ $<; 65 20 66 $(DIR_OBJ)/ %.o: %.c $(HEADERS)21 $(DIR_OBJ)/$(ENTITY)_%.o : %.c $(HEADERS) 67 22 @\ 68 23 $(ECHO) "Compilation : $*";\ 69 24 $(CC) $(MORPHEO_CC_FLAGS) -c -o $@ $<; 70 25 71 $(DIR_BIN)/%.x : $( OBJECTS_DEPS) $(OBJECTS) $(OBJECTS_BIN)72 \26 $(DIR_BIN)/%.x : $($(ENTITY)_OBJECTS_DEPS) $(OBJECTS_BIN) 27 @\ 73 28 $(ECHO) "Compilation : $*";\ 74 29 $(CXX) $(MORPHEO_L_FLAGS) -o $@ $^ $(LIBNAME); … … 93 48 all_environment : test_env $(DIR_OBJ) 94 49 @\ 95 $(MAKE) $( OBJECTS_DEPS) $(OBJECTS) $(OBJECTS_BIN)50 $(MAKE) $($(ENTITY)_OBJECTS_DEPS) $(OBJECTS_BIN) 96 51 97 52 environment_clean : -
trunk/IPs/systemC/Environment/Makefile.deps
r88 r113 17 17 ENVIRONMENT_INCDIR = -I$(ENVIRONMENT_DIR)/include 18 18 ENVIRONMENT_LIBDIR = -L$(ENVIRONMENT_DIR)/lib 19 ENVIRONMENT_LIBNAME = -lEnvironment -lbfd -liberty 19 ENVIRONMENT_LIBNAME = -lEnvironment -lbfd -liberty -
trunk/IPs/systemC/Environment/Queue/Makefile
r88 r113 1 #-----[ Variables ]----------------------------------------2 3 ENTITY ?= Queue4 5 1 #-----[ Rules ]-------------------------------------------- 6 2 … … 16 12 @$(MAKE) environment_help 17 13 18 include ../Makefile.Environment 14 include Makefile.defs 15 include $(DIR_ENVIRONMENT)/Makefile.Environment -
trunk/IPs/systemC/Environment/RamLock/Makefile
r88 r113 1 #-----[ Variables ]----------------------------------------2 3 ENTITY ?= RamLock4 5 1 #-----[ Rules ]-------------------------------------------- 6 2 … … 16 12 @$(MAKE) environment_help 17 13 18 include ../Makefile.Environment 14 include Makefile.defs 15 include $(DIR_ENVIRONMENT)/Makefile.Environment -
trunk/IPs/systemC/Environment/Sim2OS/Makefile
r88 r113 1 #-----[ Directory ]----------------------------------------2 3 DIR_ENDIANNESS = ../Endianness4 5 #-----[ Variable ]-----------------------------------------6 7 ENTITY ?= Sim2OS8 9 OBJECTS_DEPS = $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))10 11 1 #-----[ Rules ]-------------------------------------------- 12 2 … … 26 16 @$(MAKE) environment_help 27 17 28 include ../Makefile.Environment 18 include Makefile.defs 19 include $(DIR_ENVIRONMENT)/Makefile.Environment 20 -
trunk/IPs/systemC/Environment/TTY/Makefile
r88 r113 1 #-----[ Directory ]----------------------------------------2 3 #-----[ Variable ]-----------------------------------------4 5 ENTITY ?= TTY6 7 #OBJECTS_DEPS =8 9 1 #-----[ Rules ]-------------------------------------------- 10 2 11 3 all : 12 @\ 13 $(MAKE) all_environment; 4 @$(MAKE) all_environment 14 5 15 6 clean : 16 @\ 17 $(MAKE) environment_clean;\ 18 $(RM) tty_*; 7 @$(MAKE) environment_clean; $(RM) tty_* 19 8 20 9 clean_all : clean
Note: See TracChangeset
for help on using the changeset viewer.