| 1 |
2 |
zero_gravi |
#################################################################################################
|
| 2 |
|
|
# << NEORV32 - All-Projects Makefile >> #
|
| 3 |
|
|
# ********************************************************************************************* #
|
| 4 |
|
|
# Make sure to add the riscv GCC compiler's bin folder to your PATH variable. #
|
| 5 |
|
|
# ********************************************************************************************* #
|
| 6 |
|
|
# BSD 3-Clause License #
|
| 7 |
|
|
# #
|
| 8 |
|
|
# Copyright (c) 2020, Stephan Nolting. All rights reserved. #
|
| 9 |
|
|
# #
|
| 10 |
|
|
# Redistribution and use in source and binary forms, with or without modification, are #
|
| 11 |
|
|
# permitted provided that the following conditions are met: #
|
| 12 |
|
|
# #
|
| 13 |
|
|
# 1. Redistributions of source code must retain the above copyright notice, this list of #
|
| 14 |
|
|
# conditions and the following disclaimer. #
|
| 15 |
|
|
# #
|
| 16 |
|
|
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of #
|
| 17 |
|
|
# conditions and the following disclaimer in the documentation and/or other materials #
|
| 18 |
|
|
# provided with the distribution. #
|
| 19 |
|
|
# #
|
| 20 |
|
|
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to #
|
| 21 |
|
|
# endorse or promote products derived from this software without specific prior written #
|
| 22 |
|
|
# permission. #
|
| 23 |
|
|
# #
|
| 24 |
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS #
|
| 25 |
|
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF #
|
| 26 |
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE #
|
| 27 |
|
|
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
|
| 28 |
|
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE #
|
| 29 |
|
|
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED #
|
| 30 |
|
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING #
|
| 31 |
|
|
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED #
|
| 32 |
|
|
# OF THE POSSIBILITY OF SUCH DAMAGE. #
|
| 33 |
|
|
# ********************************************************************************************* #
|
| 34 |
|
|
# The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting #
|
| 35 |
|
|
#################################################################################################
|
| 36 |
|
|
|
| 37 |
|
|
|
| 38 |
|
|
#-------------------------------------------------------------------------------
|
| 39 |
|
|
# Make defaults and targets
|
| 40 |
|
|
#-------------------------------------------------------------------------------
|
| 41 |
|
|
.SUFFIXES:
|
| 42 |
|
|
.DEFAULT_GOAL := help
|
| 43 |
|
|
|
| 44 |
|
|
TOPTARGETS := compile clean_all check info
|
| 45 |
|
|
|
| 46 |
|
|
SUBDIRS := $(wildcard */.)
|
| 47 |
|
|
# ignore dummy folders (starting with '~')
|
| 48 |
|
|
DUMMYDIRS := $(wildcard ~*/.)
|
| 49 |
|
|
SUBDIRS := $(filter-out $(DUMMYDIRS), $(SUBDIRS))
|
| 50 |
|
|
|
| 51 |
|
|
$(TOPTARGETS): $(SUBDIRS)
|
| 52 |
|
|
$(SUBDIRS):
|
| 53 |
|
|
@set -e
|
| 54 |
|
|
@$(MAKE) -C $@ $(MAKECMDGOALS)
|
| 55 |
|
|
|
| 56 |
|
|
.PHONY: $(TOPTARGETS) $(SUBDIRS)
|
| 57 |
|
|
|
| 58 |
|
|
|
| 59 |
|
|
#-------------------------------------------------------------------------------
|
| 60 |
|
|
# Help
|
| 61 |
|
|
#-------------------------------------------------------------------------------
|
| 62 |
|
|
help:
|
| 63 |
|
|
@echo "Compile / clean up all projects"
|
| 64 |
|
|
@echo "Targets:"
|
| 65 |
|
|
@echo " help - show this text"
|
| 66 |
|
|
@echo " check - check toolchain"
|
| 67 |
|
|
@echo " info - show makefile configuration"
|
| 68 |
|
|
@echo " compile - compile all projects"
|
| 69 |
|
|
@echo " clean_all - clean up everything"
|
| 70 |
|
|
|