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