Changeset 113 for trunk/IPs/systemC/Environment/Makefile
- Timestamp:
- Apr 14, 2009, 8:39:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 :
Note: See TracChangeset
for help on using the changeset viewer.