nuttx-apps/Directory.mk

62 lines
2.1 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 */Makefile))
CONFIGSUBDIRS := $(filter-out $(dir $(wildcard */Kconfig)),$(SUBDIRS))
CLEANSUBDIRS += $(dir $(wildcard */.depend))
CLEANSUBDIRS += $(dir $(wildcard */.kconfig))
CLEANSUBDIRS := $(sort $(CLEANSUBDIRS))
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
CONFIGSUBDIRS := $(subst /,\,$(CONFIGSUBDIRS))
CLEANSUBDIRS := $(subst /,\,$(CLEANSUBDIRS))
endif
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