1 | ifeq ($(origin MORPHEO_TOPLEVEL), undefined) |
---|
2 | $(error "variable MORPHEO_TOPLEVEL is undefined"); |
---|
3 | else |
---|
4 | include $(MORPHEO_TOPLEVEL)/Makefile.tools |
---|
5 | include $(MORPHEO_TOPLEVEL)/Makefile.flags |
---|
6 | endif |
---|
7 | |
---|
8 | #-----[ Directory ]---------------------------------------- |
---|
9 | DIR_LIB = $(MORPHEO_PREFIX)/lib/$(MORPHEO_TYPE) |
---|
10 | DIR_ENVIRONMENT = . |
---|
11 | DIR_CACHE = Cache |
---|
12 | DIR_DATA = Data |
---|
13 | DIR_ENDIANNESS = Endianness |
---|
14 | DIR_QUEUE = Queue |
---|
15 | DIR_RAMLOCK = RamLock |
---|
16 | DIR_SIM2OS = Sim2OS |
---|
17 | DIR_TTY = TTY |
---|
18 | |
---|
19 | include $(DIR_CACHE)/Makefile.defs |
---|
20 | include $(DIR_DATA)/Makefile.defs |
---|
21 | include $(DIR_ENDIANNESS)/Makefile.defs |
---|
22 | include $(DIR_QUEUE)/Makefile.defs |
---|
23 | include $(DIR_RAMLOCK)/Makefile.defs |
---|
24 | include $(DIR_SIM2OS)/Makefile.defs |
---|
25 | include $(DIR_TTY)/Makefile.defs |
---|
26 | |
---|
27 | #-----[ Variable ]----------------------------------------- |
---|
28 | |
---|
29 | ENTITY := Environment |
---|
30 | DIR_SRC = $(DIR_ENVIRONMENT)/src |
---|
31 | |
---|
32 | include $(DIR_ENVIRONMENT)/Makefile.defs |
---|
33 | |
---|
34 | LIBRARY_NAME := $(ENTITY) |
---|
35 | LIBRARY_FILE := $(DIR_LIB)/lib$(LIBRARY_NAME).a |
---|
36 | |
---|
37 | Environment_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 | |
---|
48 | all : |
---|
49 | @\ |
---|
50 | $(MAKE) --directory=$(DIR_CACHE) all; \ |
---|
51 | $(MAKE) --directory=$(DIR_DATA) all; \ |
---|
52 | $(MAKE) --directory=$(DIR_ENDIANNESS) all; \ |
---|
53 | $(MAKE) --directory=$(DIR_QUEUE) all; \ |
---|
54 | $(MAKE) --directory=$(DIR_RAMLOCK) all; \ |
---|
55 | $(MAKE) --directory=$(DIR_SIM2OS) all; \ |
---|
56 | $(MAKE) --directory=$(DIR_TTY) all; \ |
---|
57 | $(MAKE) $(LIBRARY_FILE); |
---|
58 | |
---|
59 | |
---|
60 | $(LIBRARY_FILE) : $(DIR_LIB) $(Environment_OBJECTS_DEPS) |
---|
61 | @\ |
---|
62 | $(ECHO) "Archive : $@";\ |
---|
63 | $(AR) -r $@ $(Environment_OBJECTS_DEPS);\ |
---|
64 | $(RANLIB) $@; |
---|
65 | |
---|
66 | $(DIR_LIB) : |
---|
67 | @\ |
---|
68 | $(ECHO) "Create directory : $@";\ |
---|
69 | $(MKDIR) $@ |
---|
70 | |
---|
71 | exe_all : |
---|
72 | @\ |
---|
73 | $(MAKE) --directory=$(DIR_CACHE) clean; \ |
---|
74 | $(MAKE) --directory=$(DIR_CACHE) exe; \ |
---|
75 | $(MAKE) --directory=$(DIR_DATA) clean; \ |
---|
76 | $(MAKE) --directory=$(DIR_DATA) exe; \ |
---|
77 | $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \ |
---|
78 | $(MAKE) --directory=$(DIR_ENDIANNESS) exe; \ |
---|
79 | $(MAKE) --directory=$(DIR_QUEUE) clean; \ |
---|
80 | $(MAKE) --directory=$(DIR_QUEUE) exe; \ |
---|
81 | $(MAKE) --directory=$(DIR_RAMLOCK) clean; \ |
---|
82 | $(MAKE) --directory=$(DIR_RAMLOCK) exe; \ |
---|
83 | $(MAKE) --directory=$(DIR_SIM2OS) clean; \ |
---|
84 | $(MAKE) --directory=$(DIR_SIM2OS) exe; \ |
---|
85 | $(MAKE) --directory=$(DIR_TTY) clean; \ |
---|
86 | $(MAKE) --directory=$(DIR_TTY) exe; \ |
---|
87 | $(MAKE) clean; \ |
---|
88 | $(MAKE) exe; |
---|
89 | |
---|
90 | clean : |
---|
91 | @\ |
---|
92 | $(MAKE) --directory=$(DIR_CACHE) clean; \ |
---|
93 | $(MAKE) --directory=$(DIR_DATA) clean; \ |
---|
94 | $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \ |
---|
95 | $(MAKE) --directory=$(DIR_QUEUE) clean; \ |
---|
96 | $(MAKE) --directory=$(DIR_RAMLOCK) clean; \ |
---|
97 | $(MAKE) --directory=$(DIR_SIM2OS) clean; \ |
---|
98 | $(MAKE) --directory=$(DIR_TTY) clean; \ |
---|
99 | $(MAKE) environment_clean; \ |
---|
100 | $(RM) tty_*; |
---|
101 | |
---|
102 | clean_all : clean |
---|
103 | @\ |
---|
104 | $(RM) $(DIR_LIB); |
---|
105 | |
---|
106 | help : |
---|
107 | @$(MAKE) environment_help |
---|
108 | |
---|
109 | include Makefile.Environment |
---|