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
Line 
1#
2# $Id: Makefile.Common 83 2008-05-09 18:00:21Z rosiere $
3#
4# [ Description ]
5#
6# Makefile
7#
8
9include                         $(MORPHEO_TOPLEVEL)/Makefile.tools
10
11#-----[ Directory ]----------------------------------------
12DIR_INC                         = include
13DIR_SRC                         = src
14DIR_OBJ                         = obj
15DIR_SCRIPT                      = $(MORPHEO_SCRIPT)
16
17#-----[ Compilation ]--------------------------------------
18INCDIR                          = $(SYSTEMC_INCDIR_$(SIMULATOR))        \
19                                  -I$(DIR_MORPHEO)
20
21LIBDIR                          = $(DIR_LIBRARY)                        \
22                                  $(SYSTEMC_LIBDIR_$(SIMULATOR))       
23#                                 $(OR1K_LIBDIR)                               
24
25LIBS                            = $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))
26
27#                                 $(OR1K_LIBNAME) -lbfd 
28
29FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
30                                  $(CXX_FLAGS)
31
32CFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(INCDIR)
33LFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(LIBDIR)
34
35#-----[ Variable ]-----------------------------------------
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
43#-----[ Rules ]--------------------------------------------
44.PRECIOUS                       : $(DIR_OBJ)/%.o
45
46test_env                        :
47ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
48                                $(error "variable MORPHEO_TOPLEVEL is undefined");
49endif
50ifeq ($(origin MORPHEO_SCRIPT), undefined)
51                                $(error "variable MORPHEO_SCRIPT   is undefined");
52endif
53ifeq ($(origin DIR_MORPHEO), undefined)
54                                $(error "variable DIR_MORPHEO      is undefined");
55endif
56                                @$(ECHO) "-------------------| $(ENTITY)"
57
58
59$(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
60                                @\
61                                $(ECHO) "Compilation        : $*";\
62                                $(CXX) $(CFLAGS) -c -o $@ $<;
63
64$(DIR_OBJ)                      :
65                                @\
66                                $(ECHO) "Create directory   : $@";\
67                                $(MKDIR) $@
68
69common_clean                    :
70                                @\
71                                $(ECHO) "Delete     temporary files in directory $(PWD)";\
72                                $(RM)   $(DIR_OBJ)      \
73                                        $(DIR_BIN)      \
74                                        *~              \
75                                        $(DIR_SRC)/*~   \
76                                        $(DIR_INC)/*~;
77
78common_help                     :
79                                @\
80                                $(ECHO) " -----[ Common ]-------------------------------------";\
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.