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

Last change on this file since 85 was 85, checked in by rosiere, 16 years ago
  • Ifetch_unit : systemC test ok
  • modif shell script and makefile.tools : SHELL=/bin/bash
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1#
2# $Id: Makefile.Common 85 2008-05-14 13:09:48Z 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.                                   \
20                                  -I$(DIR_MORPHEO)
21
22LIBDIR                          = $(DIR_LIBRARY)                        \
23                                  $(SYSTEMC_LIBDIR_$(SIMULATOR))       
24#                                 $(OR1K_LIBDIR)                               
25
26LIBS                            = $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))
27
28#                                 $(OR1K_LIBNAME) -lbfd 
29
30FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
31                                  $(CXX_FLAGS)
32
33CFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(INCDIR)
34LFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(LIBDIR)
35
36#-----[ Variable ]-----------------------------------------
37
38ENTITY                          = `$(BASENAME) $$PWD`
39
40OBJECTS_COMMON                  = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
41
42HEADERS                         = $(wildcard $(DIR_INC)/*.h)
43
44#-----[ Rules ]--------------------------------------------
45.PRECIOUS                       : $(DIR_OBJ)/%.o
46
47test_env                        :
48ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
49                                $(error "variable MORPHEO_TOPLEVEL is undefined");
50endif
51ifeq ($(origin MORPHEO_SCRIPT), undefined)
52                                $(error "variable MORPHEO_SCRIPT   is undefined");
53endif
54ifeq ($(origin DIR_MORPHEO), undefined)
55                                $(error "variable DIR_MORPHEO      is undefined");
56endif
57                                @$(ECHO) "-------------------| $(ENTITY)"
58
59
60$(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
61                                @\
62                                $(ECHO) "Compilation        : $*";\
63                                $(CXX) $(CFLAGS) -c -o $@ $<;
64
65$(DIR_OBJ)                      :
66                                @\
67                                $(ECHO) "Create directory   : $@";\
68                                $(MKDIR) $@
69
70common_clean                    :
71                                @\
72                                $(ECHO) "Delete     temporary files in directory $(PWD)";\
73                                $(RM)   $(DIR_OBJ)      \
74                                        $(DIR_BIN)      \
75                                        *~              \
76                                        $(DIR_SRC)/*~   \
77                                        $(DIR_INC)/*~;
78
79common_help                     :
80                                @\
81                                $(ECHO) " -----[ Common ]-------------------------------------";\
82                                $(ECHO) "";\
83                                $(ECHO) " * test_env             : test if environnment's variable is set";\
84                                $(ECHO) "";
Note: See TracBrowser for help on using the repository browser.