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
RevLine 
[2]1#
2# $Id: Makefile.Common 88 2008-12-10 18:31:39Z 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
[53]24#-----[ Directory ]----------------------------------------
[88]25DIR_TMP                         = $(MORPHEO_TMP)
[2]26DIR_INC                         = include
27DIR_SRC                         = src
28DIR_OBJ                         = obj
[88]29#DIR_LIB                                = $(DIR_TMP)/lib
[15]30DIR_SCRIPT                      = $(MORPHEO_SCRIPT)
[2]31
[53]32#-----[ Compilation ]--------------------------------------
[15]33INCDIR                          = $(SYSTEMC_INCDIR_$(SIMULATOR))        \
[85]34                                  -I.                                   \
[2]35                                  -I$(DIR_MORPHEO)
36
37LIBDIR                          = $(DIR_LIBRARY)                        \
[62]38                                  $(SYSTEMC_LIBDIR_$(SIMULATOR))       
39#                                 $(OR1K_LIBDIR)                               
[2]40
[81]41LIBS                            = $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))
[2]42
[81]43#                                 $(OR1K_LIBNAME) -lbfd 
[62]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 ]-----------------------------------------
[88]52ENTITY                          = $$($(BASENAME) $$PWD)
[2]53
54OBJECTS_COMMON                  = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
55
56HEADERS                         = $(wildcard $(DIR_INC)/*.h)
57
[53]58#-----[ Rules ]--------------------------------------------
[2]59.PRECIOUS                       : $(DIR_OBJ)/%.o
60
61test_env                        :
[83]62                                @$(ECHO) "-------------------| $(ENTITY)"
[2]63
[83]64
[2]65$(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
[48]66                                @\
67                                $(ECHO) "Compilation        : $*";\
68                                $(CXX) $(CFLAGS) -c -o $@ $<;
[2]69
70$(DIR_OBJ)                      :
[48]71                                @\
72                                $(ECHO) "Create directory   : $@";\
73                                $(MKDIR) $@
[2]74
75common_clean                    :
[48]76                                @\
[83]77                                $(ECHO) "Delete     temporary files in directory $(PWD)";\
[48]78                                $(RM)   $(DIR_OBJ)      \
[2]79                                        $(DIR_BIN)      \
80                                        *~              \
81                                        $(DIR_SRC)/*~   \
[48]82                                        $(DIR_INC)/*~;
[2]83
[88]84common_clean_all                : common_clean
85
[2]86common_help                     :
[48]87                                @\
[53]88                                $(ECHO) " -----[ Common ]-------------------------------------";\
[48]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.