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

Last change on this file since 15 was 15, checked in by rosiere, 17 years ago

Interface normalisé
Début du banc de registres multi niveaux

File size: 2.2 KB
Line 
1#
2# $Id$
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                                  $(SOCLIB_LIBDIR)                      \
24                                  $(OR1K_LIBDIR)                               
25
26LIBS                            = $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR)) $(SOCLIB_LIBNAME) $(OR1K_LIBNAME) -lbfd  -ldl
27
28FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
29                                  -O3                                   \
30                                  -g3                                   \
31                                  -Wall                                 \
32                                  -Wunused
33
34#                                 -Wno-deprecated                       \
35#                                 -Wno-non-template-friend              \
36#                                 -Wno-pmf-conversions                  \
37#                                 -Wfatal-errors                        \
38#                                 -pedantic                             \
39#                                 -Werror                               \
40
41CFLAGS                          = $(FLAGS) $(FLAGS_COMMON) $(INCDIR)
42LFLAGS                          = $(FLAGS) $(FLAGS_COMMON) $(LIBDIR)
43
44#-----[ Variable ]-----------------------------------------
45
46ENTITY                          = `$(BASENAME) $$PWD`
47
48OBJECTS_COMMON                  = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
49
50HEADERS                         = $(wildcard $(DIR_INC)/*.h)
51
52#-----[ Rules ]--------------------------------------------
53.PRECIOUS                       : $(DIR_OBJ)/%.o
54
55test_env                        :
56                                @$(ECHO) "-------------------[ $(ENTITY) ]"
57ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
58                                $(error "variable MORPHEO_TOPLEVEL is undefined");
59endif
60ifeq ($(origin MORPHEO_SCRIPT), undefined)
61                                $(error "variable MORPHEO_SCRIPT   is undefined");
62endif
63ifeq ($(origin DIR_MORPHEO), undefined)
64                                $(error "variable DIR_MORPHEO      is undefined");
65endif
66
67$(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
68                                @$(ECHO) "Compilation        : $*"
69                                $(CXX) $(CFLAGS) -c -o $@ $<
70
71$(DIR_OBJ)                      :
72                                @$(ECHO) "Create directory   : $@"
73                                @$(MKDIR) $@
74
75common_clean                    :
76                                @$(ECHO) "Delete     temporary files in directory "$(PWD)
77                                @$(RM)  $(DIR_OBJ)      \
78                                        $(DIR_BIN)      \
79                                        *~              \
80                                        $(DIR_SRC)/*~   \
81                                        $(DIR_INC)/*~
82
83common_help                     :
84                                @$(ECHO) " -----[ Common ]-------------------------------------"
85                                @$(ECHO) ""
86                                @$(ECHO) " * test_env             : test if environnment's variable is set"
87                                @$(ECHO) ""
Note: See TracBrowser for help on using the repository browser.