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

Last change on this file since 73 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
RevLine 
[2]1#
2# $Id$
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#                                 $(SOCLIB_LIBDIR)                      \
24#                                 $(OR1K_LIBDIR)                               
[2]25
[62]26LIBS                            = $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR)) -ldl
[2]27
[62]28#                                 $(SOCLIB_LIBNAME) $(OR1K_LIBNAME) -lbfd 
29
[15]30FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
31                                  -O3                                   \
[2]32                                  -g3                                   \
33                                  -Wall                                 \
34                                  -Wunused
[15]35
[2]36#                                 -Wno-deprecated                       \
37#                                 -Wno-non-template-friend              \
38#                                 -Wno-pmf-conversions                  \
39#                                 -Wfatal-errors                        \
40#                                 -pedantic                             \
41#                                 -Werror                               \
42
[55]43CFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(INCDIR)
44LFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(LIBDIR)
[2]45
[53]46#-----[ Variable ]-----------------------------------------
[2]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
[53]54#-----[ Rules ]--------------------------------------------
[2]55.PRECIOUS                       : $(DIR_OBJ)/%.o
56
57test_env                        :
[53]58                                @$(ECHO) "-------------------[ $(ENTITY) ]"
[15]59ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
60                                $(error "variable MORPHEO_TOPLEVEL is undefined");
[2]61endif
[15]62ifeq ($(origin MORPHEO_SCRIPT), undefined)
63                                $(error "variable MORPHEO_SCRIPT   is undefined");
64endif
[2]65ifeq ($(origin DIR_MORPHEO), undefined)
[15]66                                $(error "variable DIR_MORPHEO      is undefined");
[2]67endif
68
69$(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
[48]70                                @\
71                                $(ECHO) "Compilation        : $*";\
72                                $(CXX) $(CFLAGS) -c -o $@ $<;
[2]73
74$(DIR_OBJ)                      :
[48]75                                @\
76                                $(ECHO) "Create directory   : $@";\
77                                $(MKDIR) $@
[2]78
79common_clean                    :
[48]80                                @\
81                                $(ECHO) "Delete     temporary files in directory "$(PWD);\
82                                $(RM)   $(DIR_OBJ)      \
[2]83                                        $(DIR_BIN)      \
84                                        *~              \
85                                        $(DIR_SRC)/*~   \
[48]86                                        $(DIR_INC)/*~;
[2]87
88common_help                     :
[48]89                                @\
[53]90                                $(ECHO) " -----[ Common ]-------------------------------------";\
[48]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.