~ chicken-core (chicken-5) /GNUmakefile
Trap1# GNUmakefile - toplevel makefile. This simply includes the2# platform-specific makefile or quits when no platform is selected.3#4# Copyright (c) 2008-2022, The CHICKEN Team5# Copyright (c) 2007, Felix L. Winkelmann6# All rights reserved.7#8# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following9# conditions are met:10#11# Redistributions of source code must retain the above copyright notice, this list of conditions and the following12# disclaimer.13# Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following14# disclaimer in the documentation and/or other materials provided with the distribution.15# Neither the name of the author nor the names of its contributors may be used to endorse or promote16# products derived from this software without specific prior written permission.17#18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS19# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY20# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR21# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR22# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR23# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR25# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE26# POSSIBILITY OF SUCH DAMAGE.2728# If nothing selected, use default config (this should set PLATFORM)29ifeq ($(CONFIG)$(PLATFORM),)30CONFIG=config.make31endif3233ifneq ($(CONFIG),)34# Avoid loading config when building a boot-chicken35ifneq ($(MAKECMDGOALS),boot-chicken)36include $(CONFIG)37endif38endif3940include Makefile.detect4142ifndef PLATFORM43$(info Please select your target platform by running one of the following commands:)44$(info )45$(foreach mf, $(wildcard Makefile.*), $(info $(MAKE) PLATFORM=$(mf:Makefile.%=%)))46$(info )47$(info For more information, consult the README file.)48$(error No PLATFORM given.)49else50include $(SRCDIR)Makefile.$(PLATFORM)51endif