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

Last change on this file since 82 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 2.0 KB
RevLine 
[2]1#
2# $Id: Makefile.Common 81 2008-04-15 18:40:01Z rosiere $
3#
4# [ Description ]
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                        :
[81]47                                @$(ECHO) "-------------------| $(ENTITY)"
[15]48ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
49                                $(error "variable MORPHEO_TOPLEVEL is undefined");
[2]50endif
[15]51ifeq ($(origin MORPHEO_SCRIPT), undefined)
52                                $(error "variable MORPHEO_SCRIPT   is undefined");
53endif
[2]54ifeq ($(origin DIR_MORPHEO), undefined)
[15]55                                $(error "variable DIR_MORPHEO      is undefined");
[2]56endif
57
58$(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
[48]59                                @\
60                                $(ECHO) "Compilation        : $*";\
61                                $(CXX) $(CFLAGS) -c -o $@ $<;
[2]62
63$(DIR_OBJ)                      :
[48]64                                @\
65                                $(ECHO) "Create directory   : $@";\
66                                $(MKDIR) $@
[2]67
68common_clean                    :
[48]69                                @\
70                                $(ECHO) "Delete     temporary files in directory "$(PWD);\
71                                $(RM)   $(DIR_OBJ)      \
[2]72                                        $(DIR_BIN)      \
73                                        *~              \
74                                        $(DIR_SRC)/*~   \
[48]75                                        $(DIR_INC)/*~;
[2]76
77common_help                     :
[48]78                                @\
[53]79                                $(ECHO) " -----[ Common ]-------------------------------------";\
[48]80                                $(ECHO) "";\
81                                $(ECHO) " * test_env             : test if environnment's variable is set";\
82                                $(ECHO) "";
Note: See TracBrowser for help on using the repository browser.