blob: c502d2c793aecf6174449289adb1b27e8ca8a57d [file] [log] [blame]
Patrick Georgi0588d192009-08-12 15:00:51 +00001##
2## This file is part of the coreboot project.
3##
4## Copyright (C) 2008 Advanced Micro Devices, Inc.
5## Copyright (C) 2008 Uwe Hermann <uwe@hermann-uwe.de>
Stefan Reinauer8ed1b6d2010-01-19 21:13:44 +00006## Copyright (C) 2009-2010 coresystems GmbH
Patrick Georgi71b84802011-02-22 14:35:05 +00007## Copyright (C) 2011 secunet Security Networks AG
Patrick Georgi0588d192009-08-12 15:00:51 +00008##
Patrick Georgi3bda0442011-06-30 15:48:57 +02009## 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.
Patrick Georgi0588d192009-08-12 15:00:51 +000019##
Patrick Georgi3bda0442011-06-30 15:48:57 +020020## 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.
Patrick Georgi0588d192009-08-12 15:00:51 +000031##
32
Patrick Georgi05560bf2014-07-19 10:55:30 +020033# in addition to the dependency below, create the file if it doesn't exist
34# to silence stupid warnings about a file that would be generated anyway.
Patrick Georgibdb4af82015-11-19 09:53:04 +010035$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile || rm -f .xcompile)))
Patrick Georgi05560bf2014-07-19 10:55:30 +020036
Patrick Georgi18ff4f12014-07-10 21:06:04 +020037.xcompile: util/xcompile/xcompile
Patrick Georgi6dda31d2015-11-19 15:15:33 +010038 rm -f $@
Vadim Bendeburye4696022015-04-25 11:34:35 -070039 $< $(XGCCPATH) > $@.tmp
40 \mv -f $@.tmp $@ 2> /dev/null
Patrick Georgi75cdfd12015-11-20 10:32:14 +010041 rm -f $@.tmp
Patrick Georgi18ff4f12014-07-10 21:06:04 +020042
Jonathan Kollasch7ff5b442010-09-28 21:11:48 +000043export top := $(CURDIR)
Patrick Georgi51e142f2010-03-27 17:18:39 +000044export src := src
Patrick Georgi0588d192009-08-12 15:00:51 +000045export srck := $(top)/util/kconfig
Vadim Bendebury5f7e4f02015-05-06 21:00:10 -070046obj ?= build
47override obj := $(subst $(top)/,,$(abspath $(obj)))
48export obj
Patrick Georgia2acbc72010-04-16 22:48:57 +000049export objutil ?= $(obj)/util
50export objk := $(objutil)/kconfig
Vadim Bendebury5f7e4f02015-05-06 21:00:10 -070051absobj := $(abspath $(obj))
Patrick Georgi0588d192009-08-12 15:00:51 +000052
53
Patrick Georgi0588d192009-08-12 15:00:51 +000054export KCONFIG_AUTOHEADER := $(obj)/config.h
55export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
Patrick Georgid5208402014-04-11 20:24:06 +020056export KCONFIG_DEPENDENCIES := $(obj)/auto.conf.cmd
57export KCONFIG_SPLITCONFIG := $(obj)/config
58export KCONFIG_TRISTATE := $(obj)/tristate.conf
59export KCONFIG_NEGATIVES := 1
Stefan Reinauerd373a002015-07-17 17:29:19 -070060export KCONFIG_STRICT := 1
Patrick Georgi0588d192009-08-12 15:00:51 +000061
Patrick Georgie38d0a62011-03-01 08:09:22 +000062# directory containing the toplevel Makefile.inc
63TOPLEVEL := .
64
Patrick Georgi0588d192009-08-12 15:00:51 +000065CONFIG_SHELL := sh
66KBUILD_DEFCONFIG := configs/defconfig
67UNAME_RELEASE := $(shell uname -r)
Patrick Georgi89ec3762010-12-08 19:58:30 +000068DOTCONFIG ?= .config
69KCONFIG_CONFIG = $(DOTCONFIG)
70export KCONFIG_CONFIG
71HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG))
Patrick Georgi0588d192009-08-12 15:00:51 +000072MAKEFLAGS += -rR --no-print-directory
73
74# Make is silent per default, but 'make V=1' will show all compiler calls.
Patrick Georgi2b7418e2009-08-25 19:38:46 +000075Q:=@
Patrick Georgi0588d192009-08-12 15:00:51 +000076ifneq ($(V),1)
Patrick Georgi2b7418e2009-08-25 19:38:46 +000077ifneq ($(Q),)
78.SILENT:
79endif
Patrick Georgi0588d192009-08-12 15:00:51 +000080endif
81
Julius Werner808a4292015-03-13 11:05:07 -070082# Disable implicit/built-in rules to make Makefile errors fail fast.
83.SUFFIXES:
84
Patrick Georgif92068d2016-02-01 12:02:29 +010085HOSTCC := $(if $(shell type gcc 2>/dev/null),gcc,cc)
Patrick Georgi0588d192009-08-12 15:00:51 +000086HOSTCXX = g++
Patrick Georgib3a18ac2012-09-13 22:13:33 +020087HOSTCFLAGS := -g
88HOSTCXXFLAGS := -g
Patrick Georgi0588d192009-08-12 15:00:51 +000089
Patrick Georgi828e0e82015-04-04 15:50:20 +020090PREPROCESS_ONLY := -E -P -x assembler-with-cpp -undef -I .
91
Patrick Georgi0588d192009-08-12 15:00:51 +000092DOXYGEN := doxygen
93DOXYGEN_OUTPUT_DIR := doxygen
94
Patrick Georgi71b84802011-02-22 14:35:05 +000095all: real-all
96
Martin Roth4eea1742015-11-25 11:50:04 -070097help_coreboot help::
98 @echo '*** coreboot platform targets ***'
Martin Roth76f14b22015-11-18 13:09:23 -070099 @echo ' Use "make [target] V=1" for extra build debug information'
100 @echo ' all - Build coreboot'
101 @echo ' clean - Remove coreboot build artifacts'
102 @echo ' distclean - Remove build artifacts and config files'
103 @echo ' doxygen - Build doxygen documentation for coreboot'
104 @echo ' what-jenkins-does - Run platform build tests (Use CPUS=# for more cores)'
105 @echo ' printall - print makefile info for debugging'
106 @echo ' lint / lint-stable - run coreboot lint tools (all / minimal)'
Werner Zeh2de64102016-01-12 12:45:49 +0100107 @echo ' gitconfig - set up git to submit patches to coreboot'
Martin Roth76f14b22015-11-18 13:09:23 -0700108 @echo ' ctags / ctags-project - make ctags file for all of coreboot or current board'
109 @echo ' cscope / cscope-project - make cscope.out file for coreboot or current board'
110 @echo
111
Patrick Georgie38d0a62011-03-01 08:09:22 +0000112# This include must come _before_ the pattern rules below!
Patrick Georgi71b84802011-02-22 14:35:05 +0000113# Order _does_ matter for pattern rules.
Stefan Reinauerde60c882015-06-29 14:44:37 -0700114include $(srck)/Makefile
Patrick Georgi71b84802011-02-22 14:35:05 +0000115
Patrick Georgicf036d12010-04-21 06:36:20 +0000116# Three cases where we don't need fully populated $(obj) lists:
117# 1. when no .config exists
118# 2. when make config (in any flavour) is run
119# 3. when make distclean is run
120# Don't waste time on reading all Makefile.incs in these cases
Patrick Georgi0588d192009-08-12 15:00:51 +0000121ifeq ($(strip $(HAVE_DOTCONFIG)),)
Patrick Georgicf036d12010-04-21 06:36:20 +0000122NOCOMPILE:=1
123endif
124ifneq ($(MAKECMDGOALS),)
Martin Rothc24f3d62015-11-25 12:50:25 -0700125ifneq ($(filter %config %clean cross% clang iasl lint% help% what-jenkins-does,$(MAKECMDGOALS)),)
Patrick Georgicf036d12010-04-21 06:36:20 +0000126NOCOMPILE:=1
127endif
Patrick Georgi02ae0bf2013-02-09 15:45:02 +0100128ifeq ($(MAKECMDGOALS), %clean)
Zheng Bao0fd93d62012-10-22 16:36:03 +0800129NOMKDIR:=1
130endif
Patrick Georgicf036d12010-04-21 06:36:20 +0000131endif
Patrick Georgi0588d192009-08-12 15:00:51 +0000132
Patrick Georgicf036d12010-04-21 06:36:20 +0000133ifeq ($(NOCOMPILE),1)
Patrick Georgie38d0a62011-03-01 08:09:22 +0000134include $(TOPLEVEL)/Makefile.inc
Martin Roth67975572016-03-07 16:38:52 -0700135include $(TOPLEVEL)/payloads/Makefile.inc
Patrick Georgi71b84802011-02-22 14:35:05 +0000136real-all: config
Patrick Georgi0588d192009-08-12 15:00:51 +0000137
138else
139
Patrick Georgi977b9852010-09-24 22:15:54 +0000140include $(HAVE_DOTCONFIG)
Patrick Georgi0588d192009-08-12 15:00:51 +0000141
Patrick Georgi6dda31d2015-11-19 15:15:33 +0100142-include .xcompile
143
144ifneq ($(XCOMPILE_COMPLETE),1)
145$(shell rm -f .xcompile)
146$(error .xcompile deleted because it's invalid. \
147 Restarting the build should fix that, or explain the problem)
148endif
Patrick Georgi7b9762f2015-06-04 13:18:11 +0200149
Patrick Georgicc84a002014-05-14 21:05:35 +0200150ifneq ($(CONFIG_MMX),y)
151CFLAGS_x86_32 += -mno-mmx
152endif
153
Patrick Georgicc84a002014-05-14 21:05:35 +0200154include toolchain.inc
155
Zheng Bao07648922015-11-13 10:42:27 +0800156strip_quotes = $(strip $(subst ",,$(subst \",,$(1))))
Martin Rothbbf13992016-01-25 15:59:24 -0700157# fix makefile syntax highlighting after strip macro \" "))
Patrick Georgia84e98b2010-03-16 19:01:32 +0000158
Patrick Georgi0588d192009-08-12 15:00:51 +0000159# The primary target needs to be here before we include the
160# other files
161
Patrick Georgi71b84802011-02-22 14:35:05 +0000162real-all: real-target
Patrick Georgi0588d192009-08-12 15:00:51 +0000163
Patrick Georgi51e142f2010-03-27 17:18:39 +0000164# must come rather early
165.SECONDEXPANSION:
166
Stefan Reinauer0d869ed2015-07-17 13:31:16 -0700167$(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG)
Stefan Reinauer1425add2010-03-21 22:35:58 +0000168 $(MAKE) oldconfig
Patrick Georgi0588d192009-08-12 15:00:51 +0000169
Patrick Georgi58262652011-02-17 20:47:49 +0000170# Add a new class of source/object files to the build system
171add-class= \
172 $(eval $(1)-srcs:=) \
173 $(eval $(1)-objs:=) \
174 $(eval classes+=$(1))
Patrick Georgi8463dd92010-09-30 16:55:02 +0000175
Patrick Georgi58262652011-02-17 20:47:49 +0000176# Special classes are managed types with special behaviour
177# On parse time, for each entry in variable $(1)-y
178# a handler $(1)-handler is executed with the arguments:
179# * $(1): directory the parser is in
180# * $(2): current entry
181add-special-class= \
182 $(eval $(1):=) \
183 $(eval special-classes+=$(1))
184
Nico Huber81b09f42016-01-23 00:50:00 +0100185# Converts one or more source file paths to their corresponding build/ paths.
186# Only .c and .S get converted to .o, other files (like .ld) keep their name.
187# $1 stage name
188# $2 file path (list)
Nico Huber98fc4262016-01-23 01:24:33 +0100189src-to-obj=\
190 $(patsubst $(obj)/%,$(obj)/$(1)/%,\
191 $(patsubst $(obj)/$(1)/%,$(obj)/%,\
192 $(patsubst src/%,$(obj)/%,\
193 $(patsubst %.c,%.o,\
194 $(patsubst %.S,%.o,\
195 $(subst .$(1),,$(2)))))))
Nico Huber81b09f42016-01-23 00:50:00 +0100196
Patrick Georgi47d68d82010-03-06 21:18:43 +0000197# Clean -y variables, include Makefile.inc
Patrick Georgi8463dd92010-09-30 16:55:02 +0000198# Add paths to files in X-y to X-srcs
Patrick Georgi47d68d82010-03-06 21:18:43 +0000199# Add subdirs-y to subdirs
200includemakefiles= \
Patrick Georgi58262652011-02-17 20:47:49 +0000201 $(foreach class,classes subdirs $(classes) $(special-classes), $(eval $(class)-y:=)) \
Patrick Georgi47d68d82010-03-06 21:18:43 +0000202 $(eval -include $(1)) \
Patrick Georgi58262652011-02-17 20:47:49 +0000203 $(foreach class,$(classes-y), $(call add-class,$(class))) \
204 $(foreach class,$(classes), \
205 $(eval $(class)-srcs+= \
Vadim Bendebury5f7e4f02015-05-06 21:00:10 -0700206 $$(subst $(absobj)/,$(obj)/, \
Patrick Georgi51e142f2010-03-27 17:18:39 +0000207 $$(subst $(top)/,, \
Vadim Bendebury5f7e4f02015-05-06 21:00:10 -0700208 $$(abspath $$(subst $(dir $(1))/,/,$$(addprefix $(dir $(1)),$$($(class)-y)))))))) \
Patrick Georgi58262652011-02-17 20:47:49 +0000209 $(foreach special,$(special-classes), \
210 $(foreach item,$($(special)-y), $(call $(special)-handler,$(dir $(1)),$(item)))) \
Jonathan Kollasch7ff5b442010-09-28 21:11:48 +0000211 $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))
Patrick Georgi47d68d82010-03-06 21:18:43 +0000212
Patrick Georgi8463dd92010-09-30 16:55:02 +0000213# For each path in $(subdirs) call includemakefiles
Patrick Georgi47d68d82010-03-06 21:18:43 +0000214# Repeat until subdirs is empty
215evaluate_subdirs= \
216 $(eval cursubdirs:=$(subdirs)) \
217 $(eval subdirs:=) \
218 $(foreach dir,$(cursubdirs), \
Patrick Georgi58262652011-02-17 20:47:49 +0000219 $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \
Patrick Georgi51e142f2010-03-27 17:18:39 +0000220 $(if $(subdirs),$(eval $(call evaluate_subdirs)))
Patrick Georgi0588d192009-08-12 15:00:51 +0000221
222# collect all object files eligible for building
Patrick Georgie38d0a62011-03-01 08:09:22 +0000223subdirs:=$(TOPLEVEL)
Patrick Georgi51e142f2010-03-27 17:18:39 +0000224$(eval $(call evaluate_subdirs))
Patrick Georgi70c85ea2013-02-16 01:06:57 +0100225ifeq ($(FAILBUILD),1)
226$(error cannot continue build)
227endif
Patrick Georgi0588d192009-08-12 15:00:51 +0000228
Patrick Georgi94a45862011-10-25 14:32:21 -0700229# Eliminate duplicate mentions of source files in a class
230$(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs))))
231
Patrick Georgi10f86b02015-03-27 16:56:23 +0100232$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class),$($(class)-srcs))))
Patrick Georgid3428b02010-02-24 13:18:01 +0000233
Nico Huber963bed52013-05-15 11:47:51 +0200234# Save all objs before processing them (for dependency inclusion)
235originalobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
236
Patrick Georgi79f90102012-11-25 14:31:08 +0100237# Call post-processors if they're defined
238$(foreach class,$(classes),\
239 $(if $(value $(class)-postprocess),$(eval $(call $(class)-postprocess,$($(class)-objs)))))
240
Patrick Georgi58262652011-02-17 20:47:49 +0000241allsrcs:=$(foreach var, $(addsuffix -srcs,$(classes)), $($(var)))
242allobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
Patrick Georgi0588d192009-08-12 15:00:51 +0000243alldirs:=$(sort $(abspath $(dir $(allobjs))))
Patrick Georgi0588d192009-08-12 15:00:51 +0000244
Patrick Georgi patrick.georgic5f773d2010-03-16 12:01:13 +0000245# macro to define template macros that are used by use_template macro
246define create_cc_template
Patrick Georgi71b84802011-02-22 14:35:05 +0000247# $1 obj class
Patrick Georgi990e7c92015-04-03 10:47:15 +0200248# $2 source suffix (c, S, ld, ...)
Marc Jonesa38ccfd2014-11-06 15:50:22 -0700249# $3 additional compiler flags
250# $4 additional dependencies
Patrick Georgib8cdd9b2011-02-17 20:48:45 +0000251ifn$(EMPTY)def $(1)-objs_$(2)_template
Patrick Georgi8463dd92010-09-30 16:55:02 +0000252de$(EMPTY)fine $(1)-objs_$(2)_template
Stefan Reinauer0d869ed2015-07-17 13:31:16 -0700253$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $(KCONFIG_AUTOHEADER) $(4)
Patrick Georgi1cd76e72010-04-19 20:39:22 +0000254 @printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
Patrick Georgi75fcaf92015-04-03 10:16:12 +0200255 $(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$<
Patrick Georgi patrick.georgic5f773d2010-03-16 12:01:13 +0000256en$(EMPTY)def
Patrick Georgib8cdd9b2011-02-17 20:48:45 +0000257end$(EMPTY)if
Patrick Georgi0588d192009-08-12 15:00:51 +0000258endef
259
Patrick Georgib8cdd9b2011-02-17 20:48:45 +0000260filetypes-of-class=$(subst .,,$(sort $(suffix $($(1)-srcs))))
261$(foreach class,$(classes), \
262 $(foreach type,$(call filetypes-of-class,$(class)), \
Patrick Georgi2459aee2015-03-27 15:27:21 +0100263 $(eval $(class)-$(type)-ccopts += $(generic-$(type)-ccopts) $($(class)-generic-ccopts)) \
Patrick Georgi416ab382015-04-03 10:19:38 +0200264 $(if $(generic-objs_$(type)_template_gen),$(eval $(call generic-objs_$(type)_template_gen,$(class))),\
265 $(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-ccopts),$($(class)-$(type)-deps))))))
Patrick Georgi0588d192009-08-12 15:00:51 +0000266
Patrick Georgid69839b2015-04-03 10:32:17 +0200267foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(basename $(file)))))
Patrick Georgi58262652011-02-17 20:47:49 +0000268$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
Patrick Georgi0588d192009-08-12 15:00:51 +0000269
Julius Wernerf97b88b2014-12-05 12:32:09 -0800270DEPENDENCIES += $(addsuffix .d,$(basename $(allobjs)))
Stefan Reinauer6bee9512010-03-24 15:51:48 +0000271-include $(DEPENDENCIES)
272
Patrick Georgi0588d192009-08-12 15:00:51 +0000273printall:
Martin Roth09b64442016-06-05 10:52:43 -0600274 @$(foreach class,$(classes), echo $(class)-objs: $($(class)-objs) | tr ' ' '\n'; echo; )
275 @echo alldirs: $(alldirs) | tr ' ' '\n'; echo
276 @echo allsrcs: $(allsrcs) | tr ' ' '\n'; echo
277 @echo DEPENDENCIES: $(DEPENDENCIES) | tr ' ' '\n'; echo
278 @$(foreach class,$(special-classes),echo $(class):'$($(class))' | tr ' ' '\n'; echo; )
Patrick Georgi0588d192009-08-12 15:00:51 +0000279endif
280
Patrick Georgi40ad8422011-05-21 22:18:59 +0000281ifndef NOMKDIR
Stefan Reinauerde60c882015-06-29 14:44:37 -0700282$(shell mkdir -p $(KCONFIG_SPLITCONFIG) $(objk)/lxdialog $(additional-dirs) $(alldirs))
Patrick Georgi40ad8422011-05-21 22:18:59 +0000283endif
Patrick Georgi0588d192009-08-12 15:00:51 +0000284
Martin Roth9c1b33e2015-07-29 14:55:18 -0700285$(obj)/project_filelist.txt: all
286 find $(obj) -name "*.d" -exec cat {} \; | \
287 sed 's/[:\\]/ /g' | sed 's/ /\n/g' | sort | uniq | \
288 grep -v '\.o$$' > $(obj)/project_filelist.txt
289
290#works with either exuberant ctags or ctags.emacs
291ctags-project: clean-ctags $(obj)/project_filelist.txt
292 cat $(obj)/project_filelist.txt | \
293 xargs ctags -o tags
294
295cscope-project: clean-cscope $(obj)/project_filelist.txt
296 cat $(obj)/project_filelist.txt | xargs cscope -b
297
Warren Turkala9fc3302010-09-03 08:57:32 +0000298cscope:
299 cscope -bR
300
Patrick Georgi0588d192009-08-12 15:00:51 +0000301doxy: doxygen
302doxygen:
Nicky Sielickie08a2a52015-06-06 08:55:16 -0500303 $(DOXYGEN) Documentation/Doxyfile.coreboot
Patrick Georgi0588d192009-08-12 15:00:51 +0000304
Martin Rothd7689e42014-12-29 14:56:19 -0700305doxygen_simple:
Nicky Sielickie08a2a52015-06-06 08:55:16 -0500306 $(DOXYGEN) Documentation/Doxyfile.coreboot_simple
Martin Rothd7689e42014-12-29 14:56:19 -0700307
Patrick Georgi0588d192009-08-12 15:00:51 +0000308doxyclean: doxygen-clean
309doxygen-clean:
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000310 rm -rf $(DOXYGEN_OUTPUT_DIR)
Patrick Georgi0588d192009-08-12 15:00:51 +0000311
Patrick Georgi71b84802011-02-22 14:35:05 +0000312clean-for-update: doxygen-clean clean-for-update-target
Patrick Georgi02ae0bf2013-02-09 15:45:02 +0100313 rm -rf $(obj) .xcompile
Patrick Georgi0588d192009-08-12 15:00:51 +0000314
Patrick Georgi71b84802011-02-22 14:35:05 +0000315clean: clean-for-update clean-target
316 rm -f .ccwrap
Warren Turkal0e8f2042010-09-27 21:14:19 +0000317
Warren Turkala9fc3302010-09-03 08:57:32 +0000318clean-cscope:
319 rm -f cscope.out
320
Martin Roth9c1b33e2015-07-29 14:55:18 -0700321clean-ctags:
322 rm -f tags
323
Martin Roth67975572016-03-07 16:38:52 -0700324distclean: clean clean-ctags clean-cscope distclean-payloads
Patrick Georgicf036d12010-04-21 06:36:20 +0000325 rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
Patrick Georgi0588d192009-08-12 15:00:51 +0000326
Martin Rothd7689e42014-12-29 14:56:19 -0700327.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy doxygen_simple
Martin Roth9c1b33e2015-07-29 14:55:18 -0700328.PHONY: ctags-project cscope-project clean-ctags