Jordan Crouse | f6145c3 | 2008-03-19 23:56:58 +0000 | [diff] [blame] | 1 | ## |
Patrick Georgi | c0458e6 | 2011-07-02 00:29:09 +0200 | [diff] [blame] | 2 | ## This file is part of the libpayload project. |
Jordan Crouse | f6145c3 | 2008-03-19 23:56:58 +0000 | [diff] [blame] | 3 | ## |
| 4 | ## Copyright (C) 2008 Advanced Micro Devices, Inc. |
Uwe Hermann | e55b32a | 2008-08-08 07:56:07 +0000 | [diff] [blame] | 5 | ## Copyright (C) 2008 Uwe Hermann <uwe@hermann-uwe.de> |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 6 | ## Copyright (C) 2009-2010 coresystems GmbH |
| 7 | ## Copyright (C) 2011 secunet Security Networks AG |
Jordan Crouse | f6145c3 | 2008-03-19 23:56:58 +0000 | [diff] [blame] | 8 | ## |
| 9 | ## Redistribution and use in source and binary forms, with or without |
| 10 | ## modification, are permitted provided that the following conditions |
| 11 | ## are met: |
| 12 | ## 1. Redistributions of source code must retain the above copyright |
| 13 | ## notice, this list of conditions and the following disclaimer. |
| 14 | ## 2. Redistributions in binary form must reproduce the above copyright |
| 15 | ## notice, this list of conditions and the following disclaimer in the |
| 16 | ## documentation and/or other materials provided with the distribution. |
| 17 | ## 3. The name of the author may not be used to endorse or promote products |
| 18 | ## derived from this software without specific prior written permission. |
| 19 | ## |
| 20 | ## THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
| 21 | ## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 22 | ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 23 | ## ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| 24 | ## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 25 | ## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 26 | ## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 27 | ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 28 | ## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 29 | ## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | ## SUCH DAMAGE. |
| 31 | ## |
| 32 | |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 33 | ifeq ($(INNER_SCANBUILD),y) |
| 34 | CC_real:=$(CC) |
Jordan Crouse | f6145c3 | 2008-03-19 23:56:58 +0000 | [diff] [blame] | 35 | endif |
| 36 | |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 37 | export top := $(CURDIR) |
| 38 | export src := src |
Stefan Reinauer | 2551f59 | 2015-06-29 14:28:25 -0700 | [diff] [blame] | 39 | export srck := $(abspath $(top)/../../util/kconfig) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 40 | export obj ?= build |
| 41 | export objutil ?= $(obj)/util |
Nico Huber | 08c7018 | 2014-10-14 23:27:50 +0200 | [diff] [blame] | 42 | export objk := $(objutil)/lp_kconfig |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 43 | |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 44 | export KCONFIG_AUTOHEADER := $(obj)/config.h |
| 45 | export KCONFIG_AUTOCONFIG := $(obj)/auto.conf |
Stefan Reinauer | ed56499 | 2015-06-11 14:57:36 -0700 | [diff] [blame] | 46 | export KCONFIG_DEPENDENCIES := $(obj)/auto.conf.cmd |
| 47 | export KCONFIG_SPLITCONFIG := $(obj)/config |
| 48 | export KCONFIG_TRISTATE := $(obj)/tristate.conf |
| 49 | export KCONFIG_NEGATIVES := 1 |
| 50 | export Kconfig := Kconfig |
| 51 | export CONFIG_ := CONFIG_LP_ |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 52 | |
| 53 | # directory containing the toplevel Makefile.inc |
| 54 | TOPLEVEL := . |
| 55 | |
Gabe Black | 1ee2c6d | 2013-08-09 04:27:35 -0700 | [diff] [blame] | 56 | CONFIG_LP_SHELL := sh |
Paul Kocialkowski | db0c0c4 | 2015-08-03 14:05:33 +0200 | [diff] [blame] | 57 | KBUILD_DEFCONFIG ?= configs/defconfig |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 58 | UNAME_RELEASE := $(shell uname -r) |
| 59 | DOTCONFIG ?= .config |
| 60 | KCONFIG_CONFIG = $(DOTCONFIG) |
| 61 | export KCONFIG_CONFIG |
| 62 | HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG)) |
| 63 | MAKEFLAGS += -rR --no-print-directory |
| 64 | |
| 65 | # Make is silent per default, but 'make V=1' will show all compiler calls. |
| 66 | Q:=@ |
| 67 | ifneq ($(V),1) |
| 68 | ifneq ($(Q),) |
| 69 | .SILENT: |
| 70 | endif |
| 71 | endif |
| 72 | |
| 73 | CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E |
Uwe Hermann | e55b32a | 2008-08-08 07:56:07 +0000 | [diff] [blame] | 74 | HOSTCC = gcc |
| 75 | HOSTCXX = g++ |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 76 | HOSTCFLAGS := -I$(srck) -I$(objk) -g |
| 77 | HOSTCXXFLAGS := -I$(srck) -I$(objk) |
Jordan Crouse | f6145c3 | 2008-03-19 23:56:58 +0000 | [diff] [blame] | 78 | |
Uwe Hermann | 3b64129 | 2008-08-27 12:53:47 +0000 | [diff] [blame] | 79 | DOXYGEN := doxygen |
| 80 | DOXYGEN_OUTPUT_DIR := doxygen |
| 81 | |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 82 | all: real-all |
Jordan Crouse | c3e728f | 2008-04-09 23:05:59 +0000 | [diff] [blame] | 83 | |
Stefan Reinauer | f53dbfa | 2015-07-09 00:26:49 +0200 | [diff] [blame] | 84 | ifeq ($(INNER_SCANBUILD),y) |
| 85 | CC:=$(CC_real) |
| 86 | HOSTCC:=$(CC_real) --hostcc |
| 87 | HOSTCXX:=$(CC_real) --hostcxx |
| 88 | endif |
| 89 | |
Uwe Hermann | ea87245 | 2008-10-22 15:49:20 +0000 | [diff] [blame] | 90 | # This include must come _before_ the pattern rules below! |
| 91 | # Order _does_ matter for pattern rules. |
Stefan Reinauer | 2551f59 | 2015-06-29 14:28:25 -0700 | [diff] [blame] | 92 | include $(srck)/Makefile |
Uwe Hermann | ea87245 | 2008-10-22 15:49:20 +0000 | [diff] [blame] | 93 | |
Stefan Reinauer | 8af0d03 | 2012-12-14 13:05:21 -0800 | [diff] [blame] | 94 | include $(HAVE_DOTCONFIG) |
| 95 | |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 96 | ARCHDIR-$(CONFIG_LP_ARCH_ARM) := arm |
Furquan Shaikh | 8c8c377 | 2014-02-19 11:35:30 -0800 | [diff] [blame] | 97 | ARCHDIR-$(CONFIG_LP_ARCH_ARM64) := arm64 |
Ionela Voinescu | ce22c02 | 2014-09-24 17:05:33 +0100 | [diff] [blame] | 98 | ARCHDIR-$(CONFIG_LP_ARCH_MIPS) := mips |
Gabe Black | 1ee2c6d | 2013-08-09 04:27:35 -0700 | [diff] [blame] | 99 | ARCHDIR-$(CONFIG_LP_ARCH_X86) := x86 |
Stefan Reinauer | 8af0d03 | 2012-12-14 13:05:21 -0800 | [diff] [blame] | 100 | |
| 101 | ARCH-y := $(ARCHDIR-y) |
| 102 | |
Patrick Georgi | 21fc58b | 2015-07-06 09:07:11 +0000 | [diff] [blame] | 103 | # If architecture folder name is different from xcompile architecture name, |
Stefan Reinauer | 8af0d03 | 2012-12-14 13:05:21 -0800 | [diff] [blame] | 104 | # override here. |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 105 | ARCH-$(CONFIG_LP_ARCH_ARM) := arm |
Furquan Shaikh | 8c8c377 | 2014-02-19 11:35:30 -0800 | [diff] [blame] | 106 | ARCH-$(CONFIG_LP_ARCH_ARM64) := arm64 |
Patrick Georgi | 21fc58b | 2015-07-06 09:07:11 +0000 | [diff] [blame] | 107 | ARCH-$(CONFIG_LP_ARCH_X86) := x86_32 |
| 108 | ARCH-$(CONFIG_LP_ARCH_MIPS) := mips |
Stefan Reinauer | 8af0d03 | 2012-12-14 13:05:21 -0800 | [diff] [blame] | 109 | |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 110 | # Three cases where we don't need fully populated $(obj) lists: |
| 111 | # 1. when no .config exists |
| 112 | # 2. when make config (in any flavour) is run |
| 113 | # 3. when make distclean is run |
| 114 | # Don't waste time on reading all Makefile.incs in these cases |
Uwe Hermann | ea87245 | 2008-10-22 15:49:20 +0000 | [diff] [blame] | 115 | ifeq ($(strip $(HAVE_DOTCONFIG)),) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 116 | NOCOMPILE:=1 |
| 117 | endif |
| 118 | ifneq ($(MAKECMDGOALS),) |
Patrick Georgi | 0ffef88 | 2017-01-19 23:20:14 +0100 | [diff] [blame] | 119 | ifneq ($(filter %config %clean,$(MAKECMDGOALS)),) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 120 | NOCOMPILE:=1 |
| 121 | endif |
| 122 | endif |
| 123 | |
| 124 | ifeq ($(NOCOMPILE),1) |
| 125 | include $(TOPLEVEL)/Makefile.inc |
| 126 | real-all: config |
| 127 | |
Uwe Hermann | ea87245 | 2008-10-22 15:49:20 +0000 | [diff] [blame] | 128 | else |
| 129 | |
Patrick Georgi | 0ffef88 | 2017-01-19 23:20:14 +0100 | [diff] [blame] | 130 | # in addition to the dependency below, create the file if it doesn't exist |
| 131 | # to silence stupid warnings about a file that would be generated anyway. |
| 132 | $(if $(wildcard .xcompile)$(NOCOMPILE),,$(eval $(shell $(top)/../../util/xcompile/xcompile $(XGCCPATH) > .xcompile))) |
| 133 | |
| 134 | .xcompile: $(top)/../../util/xcompile/xcompile |
| 135 | $< $(XGCCPATH) > $@.tmp |
| 136 | \mv -f $@.tmp $@ 2> /dev/null |
| 137 | |
| 138 | -include .xcompile |
| 139 | |
Patrick Georgi | b144a34 | 2017-01-25 14:21:12 +0100 | [diff] [blame] | 140 | CC := $(CC_$(ARCH-y)) |
| 141 | AS := $(AS_$(ARCH-y)) |
| 142 | LD := $(LD_$(ARCH-y)) |
| 143 | NM := $(NM_$(ARCH-y)) |
| 144 | OBJCOPY := $(OBJCOPY_$(ARCH-y)) |
| 145 | OBJDUMP := $(OBJDUMP_$(ARCH-y)) |
| 146 | READELF := $(READELF_$(ARCH-y)) |
| 147 | STRIP := $(STRIP_$(ARCH-y)) |
| 148 | AR := $(AR_$(ARCH-y)) |
| 149 | |
| 150 | CFLAGS += $(CFLAGS_$(ARCH-y)) |
| 151 | |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 152 | ifneq ($(INNER_SCANBUILD),y) |
Gabe Black | 1ee2c6d | 2013-08-09 04:27:35 -0700 | [diff] [blame] | 153 | ifeq ($(CONFIG_LP_COMPILER_LLVM_CLANG),y) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 154 | CC:=clang -m32 |
| 155 | HOSTCC:=clang |
| 156 | endif |
| 157 | endif |
| 158 | |
Gabe Black | 1ee2c6d | 2013-08-09 04:27:35 -0700 | [diff] [blame] | 159 | ifeq ($(CONFIG_LP_CCACHE),y) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 160 | CCACHE:=$(word 1,$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH))))) |
| 161 | ifeq ($(CCACHE),) |
| 162 | $(error ccache selected, but not found in PATH) |
| 163 | endif |
| 164 | CCACHE:=CCACHE_COMPILERCHECK=content CCACHE_BASEDIR=$(top) $(CCACHE) |
| 165 | CC := $(CCACHE) $(CC) |
| 166 | HOSTCC := $(CCACHE) $(HOSTCC) |
| 167 | HOSTCXX := $(CCACHE) $(HOSTCXX) |
| 168 | ROMCC := $(CCACHE) $(ROMCC) |
| 169 | endif |
| 170 | |
| 171 | strip_quotes = $(subst ",,$(subst \",,$(1))) |
| 172 | |
| 173 | # The primary target needs to be here before we include the |
| 174 | # other files |
| 175 | |
| 176 | ifeq ($(INNER_SCANBUILD),y) |
Gabe Black | 1ee2c6d | 2013-08-09 04:27:35 -0700 | [diff] [blame] | 177 | CONFIG_LP_SCANBUILD_ENABLE:= |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 178 | endif |
| 179 | |
Gabe Black | 1ee2c6d | 2013-08-09 04:27:35 -0700 | [diff] [blame] | 180 | ifeq ($(CONFIG_LP_SCANBUILD_ENABLE),y) |
| 181 | ifneq ($(CONFIG_LP_SCANBUILD_REPORT_LOCATION),) |
| 182 | CONFIG_LP_SCANBUILD_REPORT_LOCATION:=-o $(CONFIG_LP_SCANBUILD_REPORT_LOCATION) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 183 | endif |
| 184 | real-all: |
| 185 | echo '#!/bin/sh' > .ccwrap |
| 186 | echo 'CC="$(CC)"' >> .ccwrap |
| 187 | echo 'if [ "$$1" = "--hostcc" ]; then shift; CC="$(HOSTCC)"; fi' >> .ccwrap |
| 188 | echo 'if [ "$$1" = "--hostcxx" ]; then shift; CC="$(HOSTCXX)"; fi' >> .ccwrap |
| 189 | echo 'eval $$CC $$*' >> .ccwrap |
| 190 | chmod +x .ccwrap |
Gabe Black | 1ee2c6d | 2013-08-09 04:27:35 -0700 | [diff] [blame] | 191 | scan-build $(CONFIG_LP_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 192 | else |
| 193 | real-all: real-target |
| 194 | endif |
| 195 | |
| 196 | # must come rather early |
| 197 | .SECONDEXPANSION: |
| 198 | |
Nico Huber | 602a82a | 2015-09-09 13:02:51 +0200 | [diff] [blame] | 199 | $(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 200 | $(MAKE) oldconfig |
| 201 | |
| 202 | # Add a new class of source/object files to the build system |
| 203 | add-class= \ |
| 204 | $(eval $(1)-srcs:=) \ |
| 205 | $(eval $(1)-objs:=) \ |
| 206 | $(eval classes+=$(1)) |
| 207 | |
| 208 | # Special classes are managed types with special behaviour |
| 209 | # On parse time, for each entry in variable $(1)-y |
| 210 | # a handler $(1)-handler is executed with the arguments: |
| 211 | # * $(1): directory the parser is in |
| 212 | # * $(2): current entry |
| 213 | add-special-class= \ |
| 214 | $(eval $(1):=) \ |
| 215 | $(eval special-classes+=$(1)) |
| 216 | |
| 217 | # Clean -y variables, include Makefile.inc |
| 218 | # Add paths to files in X-y to X-srcs |
| 219 | # Add subdirs-y to subdirs |
| 220 | includemakefiles= \ |
| 221 | $(foreach class,classes subdirs $(classes) $(special-classes), $(eval $(class)-y:=)) \ |
| 222 | $(eval -include $(1)) \ |
| 223 | $(foreach class,$(classes-y), $(call add-class,$(class))) \ |
| 224 | $(foreach class,$(classes), \ |
| 225 | $(eval $(class)-srcs+= \ |
| 226 | $$(subst $(top)/,, \ |
| 227 | $$(abspath $$(addprefix $(dir $(1)),$$($(class)-y)))))) \ |
| 228 | $(foreach special,$(special-classes), \ |
| 229 | $(foreach item,$($(special)-y), $(call $(special)-handler,$(dir $(1)),$(item)))) \ |
| 230 | $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y))))) |
| 231 | |
| 232 | # For each path in $(subdirs) call includemakefiles |
| 233 | # Repeat until subdirs is empty |
| 234 | evaluate_subdirs= \ |
| 235 | $(eval cursubdirs:=$(subdirs)) \ |
| 236 | $(eval subdirs:=) \ |
| 237 | $(foreach dir,$(cursubdirs), \ |
| 238 | $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ |
| 239 | $(if $(subdirs),$(eval $(call evaluate_subdirs))) |
| 240 | |
| 241 | # collect all object files eligible for building |
| 242 | subdirs:=$(TOPLEVEL) |
| 243 | $(eval $(call evaluate_subdirs)) |
| 244 | |
| 245 | src-to-obj=$(addsuffix .$(1).o, $(basename $(addprefix $(obj)/, $($(1)-srcs)))) |
| 246 | $(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class)))) |
| 247 | |
| 248 | allsrcs:=$(foreach var, $(addsuffix -srcs,$(classes)), $($(var))) |
| 249 | allobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var))) |
| 250 | alldirs:=$(sort $(abspath $(dir $(allobjs)))) |
| 251 | |
| 252 | # macro to define template macros that are used by use_template macro |
| 253 | define create_cc_template |
| 254 | # $1 obj class |
| 255 | # $2 source suffix (c, S) |
| 256 | # $3 additional compiler flags |
| 257 | # $4 additional dependencies |
| 258 | ifn$(EMPTY)def $(1)-objs_$(2)_template |
| 259 | de$(EMPTY)fine $(1)-objs_$(2)_template |
Gabe Black | f06111a | 2013-03-12 15:50:08 -0700 | [diff] [blame] | 260 | $(obj)/$$(1).$(1).o: $$(1).$(2) $(obj)/libpayload-config.h $(4) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 261 | @printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" |
| 262 | $(CC) $(3) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$< |
| 263 | en$(EMPTY)def |
| 264 | end$(EMPTY)if |
| 265 | endef |
| 266 | |
| 267 | filetypes-of-class=$(subst .,,$(sort $(suffix $($(1)-srcs)))) |
| 268 | $(foreach class,$(classes), \ |
| 269 | $(foreach type,$(call filetypes-of-class,$(class)), \ |
| 270 | $(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-ccopts),$($(class)-$(type)-deps))))) |
| 271 | |
| 272 | foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(basename $(file))))) |
| 273 | $(eval $(foreach class,$(classes),$(call foreach-src,$(class)))) |
| 274 | |
| 275 | DEPENDENCIES = $(allobjs:.o=.d) |
| 276 | -include $(DEPENDENCIES) |
| 277 | |
| 278 | printall: |
| 279 | @$(foreach class,$(classes),echo $(class)-objs:=$($(class)-objs); ) |
| 280 | @echo alldirs:=$(alldirs) |
| 281 | @echo allsrcs=$(allsrcs) |
| 282 | @echo DEPENDENCIES=$(DEPENDENCIES) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 283 | @$(foreach class,$(special-classes),echo $(class):='$($(class))'; ) |
Uwe Hermann | ea87245 | 2008-10-22 15:49:20 +0000 | [diff] [blame] | 284 | |
| 285 | endif |
Jordan Crouse | f6145c3 | 2008-03-19 23:56:58 +0000 | [diff] [blame] | 286 | |
Stefan Reinauer | ed56499 | 2015-06-11 14:57:36 -0700 | [diff] [blame] | 287 | $(shell mkdir -p $(KCONFIG_SPLITCONFIG) $(obj) $(objk)/lxdialog $(additional-dirs) $(alldirs)) |
Jordan Crouse | f6145c3 | 2008-03-19 23:56:58 +0000 | [diff] [blame] | 288 | |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 289 | cscope: |
| 290 | cscope -bR |
| 291 | |
| 292 | doxy: doxygen |
| 293 | doxygen: |
| 294 | $(DOXYGEN) Doxyfile |
| 295 | |
| 296 | doxyclean: doxygen-clean |
| 297 | doxygen-clean: |
| 298 | rm -rf $(DOXYGEN_OUTPUT_DIR) |
| 299 | |
| 300 | clean-for-update: doxygen-clean clean-for-update-target |
| 301 | rm -f $(allobjs) .xcompile |
| 302 | rm -f $(DEPENDENCIES) |
| 303 | rmdir -p $(alldirs) 2>/dev/null >/dev/null || true |
| 304 | |
| 305 | clean: clean-for-update clean-target |
Martin Roth | 6959f5c | 2016-03-23 16:07:54 -0600 | [diff] [blame] | 306 | rm -f .ccwrap junit_config junit_config.old |
Patrick Georgi | b144a34 | 2017-01-25 14:21:12 +0100 | [diff] [blame] | 307 | rm -rf $(obj) |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 308 | |
| 309 | clean-cscope: |
| 310 | rm -f cscope.out |
| 311 | |
Patrick Georgi | b144a34 | 2017-01-25 14:21:12 +0100 | [diff] [blame] | 312 | distclean: clean-cscope clean |
Martin Roth | 6959f5c | 2016-03-23 16:07:54 -0600 | [diff] [blame] | 313 | rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile junit.xml |
Patrick Georgi | b3db79e | 2011-04-21 18:48:50 +0200 | [diff] [blame] | 314 | |
Paul Kocialkowski | 5d5fcdd | 2015-08-03 16:44:01 +0200 | [diff] [blame] | 315 | .PHONY: $(PHONY) clean clean-cscope cscope distclean doxygen doxy |