2013-10-30 16:04:37 +01:00
|
|
|
############################################################################
|
|
|
|
# apps/platform/Makefile
|
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2013-10-30 16:04:37 +01:00
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2013-10-30 16:04:37 +01:00
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2013-10-30 16:04:37 +01:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-20 06:35:03 +02:00
|
|
|
include $(APPDIR)/Make.defs
|
2015-02-18 16:49:55 +01:00
|
|
|
|
2016-05-11 02:25:13 +02:00
|
|
|
CONFIG_ARCH_BOARD ?= dummy
|
2013-10-30 16:04:37 +01:00
|
|
|
|
|
|
|
# Directories
|
|
|
|
|
2016-01-27 21:19:47 +01:00
|
|
|
PLATFORMDIR = board
|
2022-11-10 18:24:10 +01:00
|
|
|
DUMMYDIR = $(APPDIR)$(DELIM)platform$(DELIM)dummy
|
2015-05-22 19:39:19 +02:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_ARCH_BOARD_CUSTOM),y)
|
|
|
|
LINKDIR = $(DUMMYDIR)
|
|
|
|
else
|
|
|
|
BOARDDIR = $(APPDIR)$(DELIM)platform$(DELIM)$(CONFIG_ARCH_BOARD)
|
|
|
|
LINKDIR = $(if $(wildcard $(BOARDDIR)$(DELIM)Make.defs),$(BOARDDIR),$(DUMMYDIR))
|
|
|
|
endif
|
2013-10-30 16:04:37 +01:00
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
VPATH += board
|
2020-07-29 06:28:00 +02:00
|
|
|
DEPPATH += --obj-path bin
|
|
|
|
DEPPATH += --obj-suffix $(OBJEXT)
|
|
|
|
DEPPATH += --dep-path $(PLATFORMDIR)
|
2013-10-30 16:04:37 +01:00
|
|
|
|
|
|
|
# Binaries
|
|
|
|
|
|
|
|
-include $(PLATFORMDIR)$(DELIM)Make.defs
|
|
|
|
|
|
|
|
# Build context setup
|
|
|
|
|
2016-05-10 23:40:20 +02:00
|
|
|
$(TOPDIR)$(DELIM).config:
|
|
|
|
|
2013-10-30 16:04:37 +01:00
|
|
|
$(PLATFORMDIR): $(TOPDIR)$(DELIM).config
|
|
|
|
@echo "LN: platform$(DELIM)board to $(LINKDIR)"
|
|
|
|
$(Q) $(DIRLINK) $(LINKDIR) $(PLATFORMDIR)
|
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
dirlinks: $(PLATFORMDIR)
|
2014-09-06 16:00:47 +02:00
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
context:: dirlinks
|
2013-10-30 16:04:37 +01:00
|
|
|
|
2018-05-31 22:48:00 +02:00
|
|
|
clean_context:
|
|
|
|
$(Q) $(DIRUNLINK) $(PLATFORMDIR)
|
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
clean::
|
2013-11-02 18:04:12 +01:00
|
|
|
$(Q) $(MAKE) -C bin TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" clean
|
2013-10-30 16:04:37 +01:00
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
include $(APPDIR)/Application.mk
|