nuttx-apps/Directory.mk

58 lines
2.0 KiB
Makefile
Raw Normal View History

2015-09-23 17:09:29 +02:00
############################################################################
# apps/Directory.mk
#
# 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 17:09:29 +02:00
#
# http:#www.apache.org/licenses/LICENSE-2.0
2015-09-23 17:09:29 +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.
2015-09-23 17:09:29 +02:00
#
############################################################################
2016-06-02 16:34:00 +02:00
include $(APPDIR)/Make.defs
2015-09-23 17:09:29 +02:00
# Sub-directories that have been built or configured.
2015-09-23 17:09:29 +02:00
SUBDIRS := $(dir $(wildcard *$(DELIM)Makefile))
CONFIGSUBDIRS := $(filter-out $(dir $(wildcard *$(DELIM)Kconfig)),$(SUBDIRS))
CLEANSUBDIRS += $(dir $(wildcard *$(DELIM).depend))
CLEANSUBDIRS += $(dir $(wildcard *$(DELIM).kconfig))
CLEANSUBDIRS := $(sort $(CLEANSUBDIRS))
2015-09-23 17:09:29 +02:00
all: nothing
.PHONY: nothing clean distclean
2015-09-23 17:09:29 +02: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 17:09:29 +02:00
nothing:
install:
preconfig: $(foreach SDIR, $(CONFIGSUBDIRS), $(SDIR)_preconfig)
ifneq ($(MENUDESC),)
2016-06-09 16:59:16 +02:00
$(Q) $(MKKCONFIG) -m $(MENUDESC)
$(Q) touch .kconfig
endif
2016-06-02 16:34:00 +02:00
clean: $(foreach SDIR, $(CLEANSUBDIRS), $(SDIR)_clean)
2015-09-23 17:09:29 +02:00
distclean: $(foreach SDIR, $(CLEANSUBDIRS), $(SDIR)_distclean)
ifneq ($(MENUDESC),)
$(call DELFILE, Kconfig)
$(call DELFILE, .kconfig)
endif
2015-09-23 17:09:29 +02:00
-include Make.dep