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

Last change on this file since 142 was 142, checked in by rosiere, 16 years ago

1) Full parallel compilation
2) Add statistics in ROB : list instruction affinity

  • 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 : all_parallel
49
50all_step :
51 @\
52 $(MAKE) lib_cache; \
53 $(MAKE) lib_data; \
54 $(MAKE) lib_endianness; \
55 $(MAKE) lib_queue; \
56 $(MAKE) lib_ramlock; \
57 $(MAKE) lib_sim2os; \
58 $(MAKE) lib_tty; \
59 $(MAKE) $(LIBRARY_FILE);
60
61all_parallel : lib_cache \
62 lib_data \
63 lib_endianness \
64 lib_queue \
65 lib_ramlock \
66 lib_sim2os \
67 lib_tty
68 @\
69 $(MAKE) $(LIBRARY_FILE);
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) : $(DIR_LIB) $(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.