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

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

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1#
2# $Id: Makefile.Common 113 2009-04-14 18:39:12Z rosiere $
3#
4# [ Description ]
5#
6# Makefile
7#
8
9ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
10        $(error "variable MORPHEO_TOPLEVEL is undefined");
11else
12        include                         $(MORPHEO_TOPLEVEL)/Makefile.tools
13endif
14ifeq ($(origin MORPHEO_TMP), undefined)
15        $(error "variable MORPHEO_TMP      is undefined");
16endif
17ifeq ($(origin MORPHEO_SCRIPT), undefined)
18        $(error "variable MORPHEO_SCRIPT   is undefined");
19endif
20ifeq ($(origin DIR_MORPHEO), undefined)
21        $(error "variable DIR_MORPHEO      is undefined");
22endif
23
24##-----[ Entity ]-------------------------------------------
25#ENTITY                         = $$($(BASENAME) $$PWD)
26
27#-----[ Directory ]----------------------------------------
28#DIR_TMP                         = .
29DIR_TMP                         = $(MORPHEO_TMP)
30DIR_INC                         = include
31DIR_SRC                         = src
32DIR_OBJ                         = $(DIR_TMP)/obj
33DIR_LIB                         = $(DIR_TMP)/lib
34DIR_SCRIPT                      = $(MORPHEO_SCRIPT)
35
36#-----[ Compilation ]--------------------------------------
37INCDIR                          = $(SYSTEMC_INCDIR_$(SIMULATOR))        \
38                                  -I.                                   \
39                                  -I$(DIR_MORPHEO)
40
41LIBDIR                          = -L$(DIR_LIB) \
42                                  $(SYSTEMC_LIBDIR_$(SIMULATOR))       
43#                                 $(OR1K_LIBDIR)                               
44
45FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
46                                  $(CXX_FLAGS)
47
48CFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(INCDIR)
49LFLAGS                          = $(MORPHEO_FLAGS) $(FLAGS_COMMON) $(LIBDIR)
50
51#-----[ Variable ]-----------------------------------------
52#OBJECTS_COMMON                 = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
53SOURCES                         = $(wildcard $(DIR_SRC)/*.cpp)
54OBJECTS_COMMON                  = $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(SOURCES)))))
55
56HEADERS                         = $(wildcard $(DIR_INC)/*.h)
57
58#-----[ Rules ]--------------------------------------------
59.PRECIOUS                       : $(DIR_OBJ)/$(ENTITY)_%.o
60
61test_env                        :
62                                @$(ECHO) "-------------------| $(ENTITY)"
63
64test                            :
65                                @echo $(DIR_LIBRARY);
66
67$(DIR_OBJ)/$(ENTITY)_%.o        : $(DIR_SRC)/%.cpp $(HEADERS)
68                                @\
69                                $(ECHO) "Compilation        : $*";\
70                                $(SYSTEMC_CXX_$(SIMULATOR)) $(CFLAGS) -c -o $@ $<;
71
72$(DIR_OBJ)                      :
73                                @\
74                                $(ECHO) "Create directory   : $@";\
75                                $(MKDIR) $@
76
77common_clean                    :
78                                @\
79                                $(ECHO) "Delete     temporary files in directory $(PWD)";\
80                                $(RM)   $(OBJECTS_COMMON)     \
81                                        *~                    \
82                                        $(DIR_SRC)/*~         \
83                                        $(DIR_INC)/*~;
84
85common_clean_all                : common_clean
86                                @\
87                                $(RM)   $(DIR_OBJ)
88
89common_help                     :
90                                @\
91                                $(ECHO) " -----[ Common ]-------------------------------------";\
92                                $(ECHO) "";\
93                                $(ECHO) " * test_env             : test if environnment's variable is set";\
94                                $(ECHO) "";
Note: See TracBrowser for help on using the repository browser.