2015-03-31 19:25:52 +02:00
|
|
|
############################################################################
|
2019-08-05 14:04:14 +02:00
|
|
|
# boards/Makefile
|
2015-03-31 19:25:52 +02:00
|
|
|
#
|
2021-03-05 10:18:57 +01: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
|
2015-03-31 19:25:52 +02:00
|
|
|
#
|
2021-03-05 10:18:57 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2015-03-31 19:25:52 +02:00
|
|
|
#
|
2021-03-05 10:18:57 +01: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.
|
2015-03-31 19:25:52 +02:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-18 21:42:11 +02:00
|
|
|
include $(TOPDIR)/Make.defs
|
2015-03-31 19:25:52 +02:00
|
|
|
|
2016-10-18 18:54:26 +02:00
|
|
|
# The board configuration should be installed in the arch/ directory
|
|
|
|
|
2020-05-20 21:41:57 +02:00
|
|
|
BOARDDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board
|
|
|
|
BOARD_INSTALLED = $(if $(wildcard $(BOARDDIR)$(DELIM)Makefile),y,)
|
2016-10-18 18:54:26 +02:00
|
|
|
|
2015-03-31 19:25:52 +02:00
|
|
|
# Basic
|
|
|
|
|
2019-06-04 00:53:11 +02:00
|
|
|
CONFIG_CSRCS = dummy.c
|
2015-03-31 19:25:52 +02:00
|
|
|
|
|
|
|
# boardctl support
|
|
|
|
|
2021-08-01 09:00:54 +02:00
|
|
|
ifeq ($(CONFIG_BOARDCTL),y)
|
2015-03-31 19:25:52 +02:00
|
|
|
CONFIG_CSRCS += boardctl.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ASRCS = $(CONFIG_ASRCS)
|
|
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|
|
|
|
|
|
|
CSRCS = $(CONFIG_CSRCS)
|
|
|
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
|
|
|
|
2016-11-27 18:19:46 +01:00
|
|
|
CXXSRCS = $(CONFIG_CXXSRCS)
|
|
|
|
CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT))
|
|
|
|
|
2019-06-03 22:45:00 +02:00
|
|
|
SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS)
|
|
|
|
OBJS = $(AOBJS) $(COBJS) $(CXXOBJS)
|
2015-03-31 19:25:52 +02:00
|
|
|
|
2019-08-05 14:04:14 +02:00
|
|
|
BIN = libboards$(LIBEXT)
|
2015-03-31 19:25:52 +02:00
|
|
|
|
|
|
|
all: $(BIN)
|
2017-03-23 00:32:52 +01:00
|
|
|
.PHONY: depend context clean_context clean distclean
|
2015-03-31 19:25:52 +02:00
|
|
|
|
|
|
|
$(AOBJS): %$(OBJEXT): %.S
|
|
|
|
$(call ASSEMBLE, $<, $@)
|
|
|
|
|
|
|
|
$(COBJS): %$(OBJEXT): %.c
|
|
|
|
$(call COMPILE, $<, $@)
|
|
|
|
|
2016-11-27 18:19:46 +01:00
|
|
|
$(CXXOBJS): %$(OBJEXT): %.cxx
|
|
|
|
$(call COMPILEXX, $<, $@)
|
|
|
|
|
2019-06-03 22:45:00 +02:00
|
|
|
$(BIN): $(OBJS)
|
|
|
|
$(call ARCHIVE, $@, $(OBJS))
|
2020-11-28 04:43:30 +01:00
|
|
|
|
2024-09-15 06:41:42 +02:00
|
|
|
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(CXXSRCS:.cxx=.ddx)
|
|
|
|
$(call CATFILE, Make.dep, $^)
|
|
|
|
$(call DELFILE, $^)
|
|
|
|
|
2020-07-22 09:54:29 +02:00
|
|
|
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
2024-09-15 06:41:42 +02:00
|
|
|
$(Q) $(MAKE) makedepfile
|
2020-03-23 03:44:03 +01:00
|
|
|
$(Q) touch $@
|
2015-03-31 19:25:52 +02:00
|
|
|
|
2020-03-23 03:44:03 +01:00
|
|
|
depend: .depend
|
2015-03-31 19:25:52 +02:00
|
|
|
|
2022-01-24 02:58:30 +01:00
|
|
|
context:
|
2016-10-18 18:54:26 +02:00
|
|
|
ifeq ($(BOARD_INSTALLED),y)
|
2020-09-14 18:53:37 +02:00
|
|
|
$(Q) $(MAKE) -C $(BOARDDIR) context
|
2016-10-18 18:54:26 +02:00
|
|
|
endif
|
2016-06-29 19:53:00 +02:00
|
|
|
|
|
|
|
clean_context:
|
|
|
|
|
|
|
|
clean: clean_context
|
2015-03-31 19:25:52 +02:00
|
|
|
$(call DELFILE, $(BIN))
|
|
|
|
$(call CLEAN)
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(call DELFILE, Make.dep)
|
2020-03-23 03:44:03 +01:00
|
|
|
$(call DELFILE, .depend)
|
2015-03-31 19:25:52 +02:00
|
|
|
|
2016-05-10 23:44:06 +02:00
|
|
|
-include Make.dep
|