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

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

Modification en profondeur de Component-port_map.
Compilation ok pour Register_unit ... a tester (systemC et vhdl)

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