2015-09-23 11:09:29 -04:00
|
|
|
############################################################################
|
|
|
|
# apps/Directory.mk
|
|
|
|
#
|
2022-03-08 09:23:14 +00: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-09-23 11:09:29 -04:00
|
|
|
#
|
2022-03-08 09:23:14 +00:00
|
|
|
# http:#www.apache.org/licenses/LICENSE-2.0
|
2015-09-23 11:09:29 -04:00
|
|
|
#
|
2022-03-08 09:23:14 +00: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-09-23 11:09:29 -04:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2016-06-02 16:34:00 +02:00
|
|
|
include $(APPDIR)/Make.defs
|
2015-09-23 11:09:29 -04:00
|
|
|
|
2020-07-24 23:18:37 +01:00
|
|
|
# Sub-directories that have been built or configured.
|
2015-09-23 11:09:29 -04:00
|
|
|
|
2022-11-11 01:24:10 +08:00
|
|
|
SUBDIRS := $(dir $(wildcard */Makefile))
|
|
|
|
CONFIGSUBDIRS := $(filter-out $(dir $(wildcard */Kconfig)),$(SUBDIRS))
|
2023-09-11 11:54:19 +08:00
|
|
|
CLEANSUBDIRS := $(dir $(wildcard *$(DELIM).built))
|
2022-11-11 01:24:10 +08:00
|
|
|
CLEANSUBDIRS += $(dir $(wildcard */.depend))
|
|
|
|
CLEANSUBDIRS += $(dir $(wildcard */.kconfig))
|
2020-07-25 16:54:27 +01:00
|
|
|
CLEANSUBDIRS := $(sort $(CLEANSUBDIRS))
|
2022-11-11 01:24:10 +08:00
|
|
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
2023-03-12 21:09:44 +08:00
|
|
|
CONFIGSUBDIRS := $(subst /,\,$(CONFIGSUBDIRS))
|
|
|
|
CLEANSUBDIRS := $(subst /,\,$(CLEANSUBDIRS))
|
2022-11-11 01:24:10 +08:00
|
|
|
endif
|
2015-09-23 11:09:29 -04:00
|
|
|
|
|
|
|
all: nothing
|
|
|
|
|
2020-07-24 23:18:37 +01:00
|
|
|
.PHONY: nothing clean distclean
|
2015-09-23 11:09:29 -04:00
|
|
|
|
2020-07-24 23:18:37 +01:00
|
|
|
$(foreach SDIR, $(CONFIGSUBDIRS), $(eval $(call SDIR_template,$(SDIR),preconfig)))
|
|
|
|
$(foreach SDIR, $(CLEANSUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean)))
|
|
|
|
$(foreach SDIR, $(CLEANSUBDIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
|
2015-09-23 11:09:29 -04:00
|
|
|
|
|
|
|
nothing:
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
2020-07-24 23:18:37 +01:00
|
|
|
preconfig: $(foreach SDIR, $(CONFIGSUBDIRS), $(SDIR)_preconfig)
|
2018-09-16 06:15:37 -06:00
|
|
|
ifneq ($(MENUDESC),)
|
2016-06-09 08:59:16 -06:00
|
|
|
$(Q) $(MKKCONFIG) -m $(MENUDESC)
|
2018-09-16 06:15:37 -06:00
|
|
|
endif
|
2023-03-13 20:33:58 +08:00
|
|
|
$(Q) touch .kconfig
|
2016-06-02 16:34:00 +02:00
|
|
|
|
2020-07-24 23:18:37 +01:00
|
|
|
clean: $(foreach SDIR, $(CLEANSUBDIRS), $(SDIR)_clean)
|
2023-05-19 11:42:48 +10:00
|
|
|
@:
|
2015-09-23 11:09:29 -04:00
|
|
|
|
2020-07-24 23:18:37 +01:00
|
|
|
distclean: $(foreach SDIR, $(CLEANSUBDIRS), $(SDIR)_distclean)
|
2018-09-08 09:42:48 -06:00
|
|
|
ifneq ($(MENUDESC),)
|
|
|
|
$(call DELFILE, Kconfig)
|
|
|
|
endif
|
2023-03-13 20:33:58 +08:00
|
|
|
$(call DELFILE, .kconfig)
|
2015-09-23 11:09:29 -04:00
|
|
|
|
|
|
|
-include Make.dep
|