source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common @ 113

Last change on this file since 113 was 113, checked in by rosiere, 15 years ago

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

  • Property svn:keywords set to Id
File size: 2.5 KB
RevLine 
[2]1#
2# $Id: Makefile.Common 113 2009-04-14 18:39:12Z rosiere $
3#
[83]4# [ Description ]
[2]5#
6# Makefile
7#
8
[88]9ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
10        $(error "variable MORPHEO_TOPLEVEL is undefined");
11else
12        include                         $(MORPHEO_TOPLEVEL)/Makefile.tools
13endif
14ifeq ($(origin MORPHEO_TMP), undefined)
15        $(error "variable MORPHEO_TMP      is undefined");
16endif
17ifeq ($(origin MORPHEO_SCRIPT), undefined)
18        $(error "variable MORPHEO_SCRIPT   is undefined");
19endif
20ifeq ($(origin DIR_MORPHEO), undefined)
21        $(error "variable DIR_MORPHEO      is undefined");
22endif
[15]23
[113]24##-----[ Entity ]-------------------------------------------
25#ENTITY                         = $$($(BASENAME) $$PWD)
26
[53]27#-----[ Directory ]----------------------------------------
[103]28#DIR_TMP                         = .
[88]29DIR_TMP                         = $(MORPHEO_TMP)
[2]30DIR_INC                         = include
31DIR_SRC                         = src
[113]32DIR_OBJ                         = $(DIR_TMP)/obj
33DIR_LIB                         = $(DIR_TMP)/lib
[15]34DIR_SCRIPT                      = $(MORPHEO_SCRIPT)
[2]35
[53]36#-----[ Compilation ]--------------------------------------
[15]37INCDIR                          = $(SYSTEMC_INCDIR_$(SIMULATOR))        \
[85]38                                  -I.                                   \
[2]39                                  -I$(DIR_MORPHEO)
40
[113]41LIBDIR                          = -L$(DIR_LIB) \
[62]42                                  $(SYSTEMC_LIBDIR_$(SIMULATOR))       
43#                                 $(OR1K_LIBDIR)                               
[2]44
[15]45FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
[78]46                                  $(CXX_FLAGS)
[15]47
[55]48CFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(INCDIR)
49LFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(LIBDIR)
[2]50
[53]51#-----[ Variable ]-----------------------------------------
[113]52#OBJECTS_COMMON                 = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
53SOURCES                         = $(wildcard $(DIR_SRC)/*.cpp)
54OBJECTS_COMMON                  = $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(SOURCES)))))
[2]55
56HEADERS                         = $(wildcard $(DIR_INC)/*.h)
57
[53]58#-----[ Rules ]--------------------------------------------
[113]59.PRECIOUS                       : $(DIR_OBJ)/$(ENTITY)_%.o
[2]60
61test_env                        :
[83]62                                @$(ECHO) "-------------------| $(ENTITY)"
[2]63
[113]64test                            :
65                                @echo $(DIR_LIBRARY);
[83]66
[113]67$(DIR_OBJ)/$(ENTITY)_%.o        : $(DIR_SRC)/%.cpp $(HEADERS)
[48]68                                @\
69                                $(ECHO) "Compilation        : $*";\
[113]70                                $(SYSTEMC_CXX_$(SIMULATOR)) $(CFLAGS) -c -o $@ $<;
[2]71
72$(DIR_OBJ)                      :
[48]73                                @\
74                                $(ECHO) "Create directory   : $@";\
75                                $(MKDIR) $@
[2]76
77common_clean                    :
[48]78                                @\
[83]79                                $(ECHO) "Delete     temporary files in directory $(PWD)";\
[113]80                                $(RM)   $(OBJECTS_COMMON)     \
81                                        *~                    \
82                                        $(DIR_SRC)/*~         \
[48]83                                        $(DIR_INC)/*~;
[2]84
[88]85common_clean_all                : common_clean
[113]86                                @\
87                                $(RM)   $(DIR_OBJ)
[88]88
[2]89common_help                     :
[48]90                                @\
[53]91                                $(ECHO) " -----[ Common ]-------------------------------------";\
[48]92                                $(ECHO) "";\
93                                $(ECHO) " * test_env             : test if environnment's variable is set";\
94                                $(ECHO) "";
Note: See TracBrowser for help on using the repository browser.