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

Last change on this file since 12 was 3, checked in by kane, 17 years ago

1) Ajout d'un "printer" XML pour la configuration de paramètres

2) Fin du composant "Two_Level_Branch_Predictor"

validation * systemc

  • vhdl
File size: 3.1 KB
Line 
1#
2# $Id$
3#
4# [ Description ]
5#
6# Makefile
7#
8
9#-----[ Directory ]----------------------------------------
10DIR_INC                         = include
11DIR_SRC                         = src
12DIR_OBJ                         = obj
13DIR_SCRIPT                      = $(DIR_MORPHEO)/Script
14
15#-----[ Commands ]-----------------------------------------
16ECHO                            = echo
17EXPORT                          = export
18MKDIR                           = mkdir -p
19TEST                            = test
20READ                            = read
21DATE                            = date +%Y%m%d-%H%M%S
22CD                              = cd
23CP                              = cp
24CAT                             = cat
25LS                              = ls
26RM                              = rm -fr
27PWD                             = `pwd`
28MAKE                            = make -s
29AR                              = ar -v
30RANLIB                          = ranlib
31BASENAME                        = basename
32GREP                            = grep
33GREP_NOT                        = egrep -v
34TR                              = tr
35UPPERtoLOWER                    = $(TR) [:lower:] [:upper:]
36
37#-----[ Compilation ]--------------------------------------
38
39SYSTEMC_systemc                 = $(TOOLS)/systemc
40SYSTEMC_systemcass              = $(TOOLS)/systemcass
41SYSTEMC_systemcass_deps         = $(SYSTEMC_systemcass)
42
43SYSTEMC                         = $(SYSTEMC_$(SIMULATOR))
44
45INCDIR                          = -I$(SYSTEMC)/include  \
46                                  -I$(DIR_MORPHEO)
47
48DIRLIB_systemc                  = lib-$(TARGET_ARCH)   
49DIRLIB_systemcass               = lib
50DIRLIB_systemcass_deps          = $(DIRLIB_systemcass)
51
52LIBDIR                          = $(DIR_LIBRARY)                        \
53                                  -L$(SYSTEMC)/$(DIRLIB_$(SIMULATOR))   \
54                                  -L$(TOOLS)/soclib/lib                 \
55                                  -L$(TOOLS)/or1k/lib                           
56
57LIBS                            = $(LIBRARY) -lm -lsystemc -lsoclib -lbfd -liberty -ldl
58# target architecture
59TARGET_ARCH                     = linux
60
61XX_systemc                      =
62XX_systemcass                   = -rdynamic                             \
63                                  -ansi                                 \
64                                  -Wno-long-long
65
66XX_systemcass_deps              = $(XX_systemcass)
67
68EXEC_PARAMS_systemc             =
69EXEC_PARAMS_systemcass          = --nobanner
70EXEC_PARAMS_systemcass_deps     = --nobanner --p
71
72
73XX_COMMON                       = -O3                                   \
74                                  -g3                                   \
75                                  -Wall                                 \
76                                  -Wunused
77#                                 -Wno-deprecated                       \
78#                                 -Wno-non-template-friend              \
79#                                 -Wno-pmf-conversions                  \
80#                                 -Wfatal-errors                        \
81#                                 -pedantic                             \
82#                                 -Werror                               \
83
84XX_OPT                          = $(XX_COMMON) $(XX_$(SIMULATOR))
85
86CXX                             = export LANG=C; g++
87CXX_OPT                         = $(XX_OPT) $(FLAGS) $(INCDIR)
88LXX_OPT                         = $(XX_OPT) $(FLAGS) $(LIBDIR)
89
90EXEC_PARAMS                     = $(EXEC_PARAMS_$(SIMULATOR))
91
92#-----[ Variable ]-----------------------------------------
93
94ENTITY                          = `$(BASENAME) $$PWD`
95
96OBJECTS_COMMON                  = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
97
98HEADERS                         = $(wildcard $(DIR_INC)/*.h)
99
100#-----[ Rules ]--------------------------------------------
101.PRECIOUS                       : $(DIR_OBJ)/%.o
102
103test_env                        :
104                                @$(ECHO) "-------------------[ $(ENTITY) ]"
105ifeq ($(origin TOOLS), undefined)
106                                $(error "variable TOOLS       is undefined");
107endif
108ifeq ($(origin DIR_MORPHEO), undefined)
109                                $(error "variable DIR_MORPHEO is undefined");
110endif
111
112$(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
113                                @$(ECHO) "Compilation        : $*"
114                                @$(CXX) $(CXX_OPT) -c -o $@ $<
115
116$(DIR_OBJ)                      :
117                                @$(ECHO) "Create directory   : $@"
118                                @$(MKDIR) $@
119
120common_clean                    :
121                                @$(ECHO) "Delete     temporary files in directory "$(PWD)
122                                @$(RM)  $(DIR_OBJ)      \
123                                        $(DIR_BIN)      \
124                                        *~              \
125                                        $(DIR_SRC)/*~   \
126                                        $(DIR_INC)/*~
127
128common_help                     :
129                                @$(ECHO) " -----[ Common ]-------------------------------------"
130                                @$(ECHO) ""
131                                @$(ECHO) " * test_env             : test if environnment's variable is set"
132                                @$(ECHO) ""
Note: See TracBrowser for help on using the repository browser.