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

Last change on this file since 83 was 83, checked in by rosiere, 16 years ago

Add component : Context_State (manage miss prediction, exception , decod_enable, synchronisation instruction ...)

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