Joey Armstrong | fedf45e | 2023-09-20 11:40:01 -0400 | [diff] [blame] | 1 | Two distinct makefile directories are in use: |
| 2 | - Common library makefiles (onf-make/) |
| 3 | - Project specific makefile logic (local/) |
| 4 | |
| 5 | Makefile logic is loaded/accessed through make macros: |
| 6 | ONF_MAKEDIR= Common makefile targets and logic |
| 7 | MAKEDIR= Repository/project specific targets |
| 8 | |
| 9 | Common library targets are defined/augmented as double colon rules: |
| 10 | build clean help sterile test :: # dup targets OK |
| 11 | |
| 12 | % make sterile test |
| 13 | |
| 14 | All other targets are defined and accessed as single colon rules: |
| 15 | repo-rule : # fail on duplicate targets |
| 16 | |
| 17 | |
| 18 | All makefiles/ logic can be access from the top level Makefile |
| 19 | ============================================================== |
| 20 | |
| 21 | TOP ?= $(strip $(dir $(abspath $(lastword $(MAKEFILE_LIST))) ) ) |
| 22 | include $(TOP)/config.mk |
| 23 | include $(TOP)/makefiles/include.mk |
| 24 | |
| 25 | Which in turn will load onf-make/ and local/ |
| 26 | ============================================ |
| 27 | include $(ONF_MAKE)/makefiles/include.mk |
| 28 | include $(MAKEDIR)/makefiles/include.mk |
| 29 | |
| 30 | % make sterile build |
| 31 | |
| 32 | # [EOF] |