[113] | 1 | ifeq ($(origin MORPHEO_TMP), undefined) |
---|
| 2 | $(error "variable MORPHEO_TMP is undefined"); |
---|
| 3 | endif |
---|
| 4 | |
---|
[81] | 5 | #-----[ Directory ]---------------------------------------- |
---|
[113] | 6 | DIR_LIB = $(DIR_TMP)/lib |
---|
| 7 | DIR_ENVIRONMENT = . |
---|
| 8 | DIR_CACHE = Cache |
---|
| 9 | DIR_DATA = Data |
---|
| 10 | DIR_ENDIANNESS = Endianness |
---|
| 11 | DIR_QUEUE = Queue |
---|
| 12 | DIR_RAMLOCK = RamLock |
---|
| 13 | DIR_SIM2OS = Sim2OS |
---|
| 14 | DIR_TTY = TTY |
---|
[81] | 15 | |
---|
[113] | 16 | include $(DIR_CACHE)/Makefile.defs |
---|
| 17 | include $(DIR_DATA)/Makefile.defs |
---|
| 18 | include $(DIR_ENDIANNESS)/Makefile.defs |
---|
| 19 | include $(DIR_QUEUE)/Makefile.defs |
---|
| 20 | include $(DIR_RAMLOCK)/Makefile.defs |
---|
| 21 | include $(DIR_SIM2OS)/Makefile.defs |
---|
| 22 | include $(DIR_TTY)/Makefile.defs |
---|
[81] | 23 | |
---|
| 24 | #-----[ Variable ]----------------------------------------- |
---|
| 25 | |
---|
[113] | 26 | ENTITY := Environment |
---|
| 27 | DIR_SRC = $(DIR_ENVIRONMENT)/src |
---|
[88] | 28 | |
---|
[113] | 29 | include $(DIR_ENVIRONMENT)/Makefile.defs |
---|
[81] | 30 | |
---|
[113] | 31 | LIBRARY_NAME := $(ENTITY) |
---|
| 32 | LIBRARY_FILE := $(DIR_LIB)/lib$(LIBRARY_NAME).a |
---|
[81] | 33 | |
---|
[113] | 34 | Environment_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 | |
---|
[81] | 43 | #-----[ Rules ]-------------------------------------------- |
---|
| 44 | |
---|
[113] | 45 | all : |
---|
[81] | 46 | @\ |
---|
[113] | 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; \ |
---|
[88] | 54 | $(MAKE) $(LIBRARY_FILE); |
---|
[81] | 55 | |
---|
[88] | 56 | |
---|
[114] | 57 | $(LIBRARY_FILE) : $(DIR_LIB) $(Environment_OBJECTS_DEPS) |
---|
[88] | 58 | @\ |
---|
| 59 | $(ECHO) "Archive : $@";\ |
---|
[113] | 60 | $(AR) -r $@ $(Environment_OBJECTS_DEPS);\ |
---|
[88] | 61 | $(RANLIB) $@; |
---|
| 62 | |
---|
| 63 | $(DIR_LIB) : |
---|
| 64 | @\ |
---|
| 65 | $(ECHO) "Create directory : $@";\ |
---|
[113] | 66 | $(MKDIR) $@ |
---|
[88] | 67 | |
---|
| 68 | exe_all : |
---|
| 69 | @\ |
---|
[113] | 70 | $(MAKE) --directory=$(DIR_CACHE) clean; \ |
---|
[88] | 71 | $(MAKE) --directory=$(DIR_CACHE) exe; \ |
---|
[113] | 72 | $(MAKE) --directory=$(DIR_DATA) clean; \ |
---|
[88] | 73 | $(MAKE) --directory=$(DIR_DATA) exe; \ |
---|
[113] | 74 | $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \ |
---|
[88] | 75 | $(MAKE) --directory=$(DIR_ENDIANNESS) exe; \ |
---|
[113] | 76 | $(MAKE) --directory=$(DIR_QUEUE) clean; \ |
---|
[88] | 77 | $(MAKE) --directory=$(DIR_QUEUE) exe; \ |
---|
[113] | 78 | $(MAKE) --directory=$(DIR_RAMLOCK) clean; \ |
---|
[88] | 79 | $(MAKE) --directory=$(DIR_RAMLOCK) exe; \ |
---|
[113] | 80 | $(MAKE) --directory=$(DIR_SIM2OS) clean; \ |
---|
[88] | 81 | $(MAKE) --directory=$(DIR_SIM2OS) exe; \ |
---|
[113] | 82 | $(MAKE) --directory=$(DIR_TTY) clean; \ |
---|
[88] | 83 | $(MAKE) --directory=$(DIR_TTY) exe; \ |
---|
[113] | 84 | $(MAKE) clean; \ |
---|
| 85 | $(MAKE) exe; |
---|
[88] | 86 | |
---|
[81] | 87 | clean : |
---|
| 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 | |
---|
[88] | 99 | clean_all : clean |
---|
| 100 | @\ |
---|
| 101 | $(RM) $(DIR_LIB); |
---|
[81] | 102 | |
---|
| 103 | help : |
---|
| 104 | @$(MAKE) environment_help |
---|
| 105 | |
---|
| 106 | include Makefile.Environment |
---|