source: trunk/IPs/systemC/Environment/Makefile @ 145

Last change on this file since 145 was 145, checked in by rosiere, 14 years ago

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
2        $(error "variable MORPHEO_TOPLEVEL is undefined");
3else
4        include $(MORPHEO_TOPLEVEL)/Makefile.tools
5        include $(MORPHEO_TOPLEVEL)/Makefile.flags
6endif
7
8#-----[ Directory ]----------------------------------------
9DIR_LIB                         = $(MORPHEO_PREFIX)/lib/$(MORPHEO_TYPE)
10DIR_ENVIRONMENT                 = .
11DIR_CACHE                       = Cache
12DIR_DATA                        = Data
13DIR_ENDIANNESS                  = Endianness
14DIR_QUEUE                       = Queue
15DIR_RAMLOCK                     = RamLock
16DIR_SIM2OS                      = Sim2OS
17DIR_TTY                         = TTY
18
19include $(DIR_CACHE)/Makefile.defs
20include $(DIR_DATA)/Makefile.defs
21include $(DIR_ENDIANNESS)/Makefile.defs
22include $(DIR_QUEUE)/Makefile.defs
23include $(DIR_RAMLOCK)/Makefile.defs
24include $(DIR_SIM2OS)/Makefile.defs
25include $(DIR_TTY)/Makefile.defs
26
27#-----[ Variable ]-----------------------------------------
28
29ENTITY                          := Environment
30DIR_SRC                          = $(DIR_ENVIRONMENT)/src
31
32include                          $(DIR_ENVIRONMENT)/Makefile.defs
33
34LIBRARY_NAME                    := $(ENTITY)
35LIBRARY_FILE                    := $(DIR_LIB)/lib$(LIBRARY_NAME).a
36
37Environment_OBJECTS_DEPS        :=      $(OBJECTS) \
38                                        $(Cache_OBJECTS_DEPS) \
39                                        $(Data_OBJECTS_DEPS) \
40                                        $(Endianness_OBJECTS_DEPS) \
41                                        $(Queue_OBJECTS_DEPS) \
42                                        $(RamLock_OBJECTS_DEPS) \
43                                        $(Sim2OS_OBJECTS_DEPS) \
44                                        $(TTY_OBJECTS_DEPS)
45
46#-----[ Rules ]--------------------------------------------
47
48all                             : $(DIR_LIB)
49                                @\
50                                $(MAKE) all_parallel; \
51                                $(MAKE) $(LIBRARY_FILE);
52
53all_step                        :
54                                @\
55                                $(MAKE) lib_cache;      \
56                                $(MAKE) lib_data;       \
57                                $(MAKE) lib_endianness; \
58                                $(MAKE) lib_queue;      \
59                                $(MAKE) lib_ramlock;    \
60                                $(MAKE) lib_sim2os;     \
61                                $(MAKE) lib_tty;
62
63all_parallel                    :       lib_cache      \
64                                        lib_data       \
65                                        lib_endianness \
66                                        lib_queue      \
67                                        lib_ramlock    \
68                                        lib_sim2os     \
69                                        lib_tty
70
71lib_cache                       :
72                                @\
73                                $(MAKE) --directory=$(DIR_CACHE)      only;
74lib_data                        :
75                                @\
76                                $(MAKE) --directory=$(DIR_DATA)       only;
77lib_endianness                  :
78                                @\
79                                $(MAKE) --directory=$(DIR_ENDIANNESS) only;
80lib_queue                       :
81                                @\
82                                $(MAKE) --directory=$(DIR_QUEUE)      only;
83lib_ramlock                     :
84                                @\
85                                $(MAKE) --directory=$(DIR_RAMLOCK)    only;
86lib_sim2os                      :
87                                @\
88                                $(MAKE) --directory=$(DIR_SIM2OS)     only;
89lib_tty                         :
90                                @\
91                                $(MAKE) --directory=$(DIR_TTY)        only;
92
93$(LIBRARY_FILE)                 : $(Environment_OBJECTS_DEPS)
94                                @\
95                                $(ECHO) "Archive            : $@";\
96                                $(AR)  -r $@ $(Environment_OBJECTS_DEPS);\
97                                $(RANLIB) $@;
98
99$(DIR_LIB)                      :
100                                @\
101                                $(ECHO) "Create directory   : $@";\
102                                $(MKDIR) $@
103
104exe_all                         :
105                                @\
106                                $(MAKE) --directory=$(DIR_CACHE)      clean; \
107                                $(MAKE) --directory=$(DIR_CACHE)      exe; \
108                                $(MAKE) --directory=$(DIR_DATA)       clean; \
109                                $(MAKE) --directory=$(DIR_DATA)       exe; \
110                                $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
111                                $(MAKE) --directory=$(DIR_ENDIANNESS) exe; \
112                                $(MAKE) --directory=$(DIR_QUEUE)      clean; \
113                                $(MAKE) --directory=$(DIR_QUEUE)      exe; \
114                                $(MAKE) --directory=$(DIR_RAMLOCK)    clean; \
115                                $(MAKE) --directory=$(DIR_RAMLOCK)    exe; \
116                                $(MAKE) --directory=$(DIR_SIM2OS)     clean; \
117                                $(MAKE) --directory=$(DIR_SIM2OS)     exe; \
118                                $(MAKE) --directory=$(DIR_TTY)        clean; \
119                                $(MAKE) --directory=$(DIR_TTY)        exe; \
120                                $(MAKE) clean; \
121                                $(MAKE) exe;
122
123clean                           :
124                                @\
125                                $(MAKE) --directory=$(DIR_CACHE)      clean; \
126                                $(MAKE) --directory=$(DIR_DATA)       clean; \
127                                $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
128                                $(MAKE) --directory=$(DIR_QUEUE)      clean; \
129                                $(MAKE) --directory=$(DIR_RAMLOCK)    clean; \
130                                $(MAKE) --directory=$(DIR_SIM2OS)     clean; \
131                                $(MAKE) --directory=$(DIR_TTY)        clean; \
132                                $(MAKE) environment_clean; \
133                                $(RM) tty_*;
134
135clean_all                       : clean
136                                @\
137                                $(RM) $(DIR_LIB);
138
139help                            :
140                                @$(MAKE) environment_help
141
142include                         Makefile.Environment
Note: See TracBrowser for help on using the repository browser.