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

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

Almost complete design
with Test and test platform

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