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

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

1) Fix bug with previous commit
2) Add test libc
3) Change Dhrystone

  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1ifeq ($(origin MORPHEO_TMP), undefined)
2        $(error "variable MORPHEO_TMP      is undefined");
3endif
4
5#-----[ Directory ]----------------------------------------
6DIR_LIB                         = $(DIR_TMP)/lib
7DIR_ENVIRONMENT                 = .
8DIR_CACHE                       = Cache
9DIR_DATA                        = Data
10DIR_ENDIANNESS                  = Endianness
11DIR_QUEUE                       = Queue
12DIR_RAMLOCK                     = RamLock
13DIR_SIM2OS                      = Sim2OS
14DIR_TTY                         = TTY
15
16include $(DIR_CACHE)/Makefile.defs
17include $(DIR_DATA)/Makefile.defs
18include $(DIR_ENDIANNESS)/Makefile.defs
19include $(DIR_QUEUE)/Makefile.defs
20include $(DIR_RAMLOCK)/Makefile.defs
21include $(DIR_SIM2OS)/Makefile.defs
22include $(DIR_TTY)/Makefile.defs
23
24#-----[ Variable ]-----------------------------------------
25
26ENTITY                          := Environment
27DIR_SRC                          = $(DIR_ENVIRONMENT)/src
28
29include                          $(DIR_ENVIRONMENT)/Makefile.defs
30
31LIBRARY_NAME                    := $(ENTITY)
32LIBRARY_FILE                    := $(DIR_LIB)/lib$(LIBRARY_NAME).a
33
34Environment_OBJECTS_DEPS        :=      $(OBJECTS) \
35                                        $(Cache_OBJECTS_DEPS) \
36                                        $(Data_OBJECTS_DEPS) \
37                                        $(Endianness_OBJECTS_DEPS) \
38                                        $(Queue_OBJECTS_DEPS) \
39                                        $(RamLock_OBJECTS_DEPS) \
40                                        $(Sim2OS_OBJECTS_DEPS) \
41                                        $(TTY_OBJECTS_DEPS)
42
43#-----[ Rules ]--------------------------------------------
44
45all                             :
46                                @\
47                                $(MAKE) --directory=$(DIR_CACHE)      all; \
48                                $(MAKE) --directory=$(DIR_DATA)       all; \
49                                $(MAKE) --directory=$(DIR_ENDIANNESS) all; \
50                                $(MAKE) --directory=$(DIR_QUEUE)      all; \
51                                $(MAKE) --directory=$(DIR_RAMLOCK)    all; \
52                                $(MAKE) --directory=$(DIR_SIM2OS)     all; \
53                                $(MAKE) --directory=$(DIR_TTY)        all; \
54                                $(MAKE) $(LIBRARY_FILE);
55
56
57$(LIBRARY_FILE)                 : $(DIR_LIB) $(Environment_OBJECTS_DEPS)
58                                @\
59                                $(ECHO) "Archive            : $@";\
60                                $(AR)  -r $@ $(Environment_OBJECTS_DEPS);\
61                                $(RANLIB) $@;
62
63$(DIR_LIB)                      :
64                                @\
65                                $(ECHO) "Create directory   : $@";\
66                                $(MKDIR) $@
67
68exe_all                         :
69                                @\
70                                $(MAKE) --directory=$(DIR_CACHE)      clean; \
71                                $(MAKE) --directory=$(DIR_CACHE)      exe; \
72                                $(MAKE) --directory=$(DIR_DATA)       clean; \
73                                $(MAKE) --directory=$(DIR_DATA)       exe; \
74                                $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
75                                $(MAKE) --directory=$(DIR_ENDIANNESS) exe; \
76                                $(MAKE) --directory=$(DIR_QUEUE)      clean; \
77                                $(MAKE) --directory=$(DIR_QUEUE)      exe; \
78                                $(MAKE) --directory=$(DIR_RAMLOCK)    clean; \
79                                $(MAKE) --directory=$(DIR_RAMLOCK)    exe; \
80                                $(MAKE) --directory=$(DIR_SIM2OS)     clean; \
81                                $(MAKE) --directory=$(DIR_SIM2OS)     exe; \
82                                $(MAKE) --directory=$(DIR_TTY)        clean; \
83                                $(MAKE) --directory=$(DIR_TTY)        exe; \
84                                $(MAKE) clean; \
85                                $(MAKE) exe;
86
87clean                           :
88                                @\
89                                $(MAKE) --directory=$(DIR_CACHE)      clean; \
90                                $(MAKE) --directory=$(DIR_DATA)       clean; \
91                                $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
92                                $(MAKE) --directory=$(DIR_QUEUE)      clean; \
93                                $(MAKE) --directory=$(DIR_RAMLOCK)    clean; \
94                                $(MAKE) --directory=$(DIR_SIM2OS)     clean; \
95                                $(MAKE) --directory=$(DIR_TTY)        clean; \
96                                $(MAKE) environment_clean; \
97                                $(RM) tty_*;
98
99clean_all                       : clean
100                                @\
101                                $(RM) $(DIR_LIB);
102
103help                            :
104                                @$(MAKE) environment_help
105
106include                         Makefile.Environment
Note: See TracBrowser for help on using the repository browser.