Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 1 | ## |
| 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 Reinauer | 8ed1b6d | 2010-01-19 21:13:44 +0000 | [diff] [blame] | 6 | ## Copyright (C) 2009-2010 coresystems GmbH |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 7 | ## Copyright (C) 2011 secunet Security Networks AG |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 8 | ## |
Stefan Reinauer | 16f515a | 2010-01-20 18:44:30 +0000 | [diff] [blame] | 9 | ## This program is free software; you can redistribute it and/or modify |
| 10 | ## it under the terms of the GNU General Public License as published by |
| 11 | ## the Free Software Foundation; version 2 of the License. |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 12 | ## |
Stefan Reinauer | 16f515a | 2010-01-20 18:44:30 +0000 | [diff] [blame] | 13 | ## This program is distributed in the hope that it will be useful, |
| 14 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | ## GNU General Public License for more details. |
| 17 | ## |
| 18 | ## You should have received a copy of the GNU General Public License |
| 19 | ## along with this program; if not, write to the Free Software |
| 20 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 21 | ## |
| 22 | |
Patrick Georgi | 020f51f | 2010-03-14 21:25:03 +0000 | [diff] [blame] | 23 | ifeq ($(INNER_SCANBUILD),y) |
| 24 | CC_real:=$(CC) |
| 25 | endif |
Patrick Georgi | 23d89cc | 2010-03-16 01:17:19 +0000 | [diff] [blame] | 26 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 27 | $(if $(wildcard .xcompile),,$(eval $(shell bash util/xcompile/xcompile > .xcompile))) |
| 28 | include .xcompile |
Patrick Georgi | 23d89cc | 2010-03-16 01:17:19 +0000 | [diff] [blame] | 29 | |
Patrick Georgi | 020f51f | 2010-03-14 21:25:03 +0000 | [diff] [blame] | 30 | ifeq ($(INNER_SCANBUILD),y) |
| 31 | CC:=$(CC_real) |
| 32 | HOSTCC:=$(CC_real) --hostcc |
| 33 | HOSTCXX:=$(CC_real) --hostcxx |
| 34 | endif |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 35 | |
Jonathan Kollasch | 7ff5b44 | 2010-09-28 21:11:48 +0000 | [diff] [blame] | 36 | export top := $(CURDIR) |
Patrick Georgi | 51e142f | 2010-03-27 17:18:39 +0000 | [diff] [blame] | 37 | export src := src |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 38 | export srck := $(top)/util/kconfig |
Patrick Georgi | 51e142f | 2010-03-27 17:18:39 +0000 | [diff] [blame] | 39 | export obj ?= build |
Patrick Georgi | a2acbc7 | 2010-04-16 22:48:57 +0000 | [diff] [blame] | 40 | export objutil ?= $(obj)/util |
| 41 | export objk := $(objutil)/kconfig |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 42 | |
| 43 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 44 | export KCONFIG_AUTOHEADER := $(obj)/config.h |
| 45 | export KCONFIG_AUTOCONFIG := $(obj)/auto.conf |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 46 | |
Patrick Georgi | e38d0a6 | 2011-03-01 08:09:22 +0000 | [diff] [blame] | 47 | # directory containing the toplevel Makefile.inc |
| 48 | TOPLEVEL := . |
| 49 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 50 | CONFIG_SHELL := sh |
| 51 | KBUILD_DEFCONFIG := configs/defconfig |
| 52 | UNAME_RELEASE := $(shell uname -r) |
Patrick Georgi | 89ec376 | 2010-12-08 19:58:30 +0000 | [diff] [blame] | 53 | DOTCONFIG ?= .config |
| 54 | KCONFIG_CONFIG = $(DOTCONFIG) |
| 55 | export KCONFIG_CONFIG |
| 56 | HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG)) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 57 | MAKEFLAGS += -rR --no-print-directory |
| 58 | |
| 59 | # Make is silent per default, but 'make V=1' will show all compiler calls. |
Patrick Georgi | 2b7418e | 2009-08-25 19:38:46 +0000 | [diff] [blame] | 60 | Q:=@ |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 61 | ifneq ($(V),1) |
Patrick Georgi | 2b7418e | 2009-08-25 19:38:46 +0000 | [diff] [blame] | 62 | ifneq ($(Q),) |
| 63 | .SILENT: |
| 64 | endif |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 65 | endif |
| 66 | |
| 67 | CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E |
| 68 | HOSTCC = gcc |
| 69 | HOSTCXX = g++ |
| 70 | HOSTCFLAGS := -I$(srck) -I$(objk) -g |
| 71 | HOSTCXXFLAGS := -I$(srck) -I$(objk) |
Stefan Reinauer | 68a564f | 2010-03-16 01:02:18 +0000 | [diff] [blame] | 72 | LIBGCC_FILE_NAME := $(shell test -r `$(CC) -print-libgcc-file-name` && $(CC) -print-libgcc-file-name) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 73 | |
| 74 | DOXYGEN := doxygen |
| 75 | DOXYGEN_OUTPUT_DIR := doxygen |
| 76 | |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 77 | all: real-all |
| 78 | |
Patrick Georgi | e38d0a6 | 2011-03-01 08:09:22 +0000 | [diff] [blame] | 79 | # This include must come _before_ the pattern rules below! |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 80 | # Order _does_ matter for pattern rules. |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 81 | include util/kconfig/Makefile |
| 82 | |
Patrick Georgi | cf036d1 | 2010-04-21 06:36:20 +0000 | [diff] [blame] | 83 | # Three cases where we don't need fully populated $(obj) lists: |
| 84 | # 1. when no .config exists |
| 85 | # 2. when make config (in any flavour) is run |
| 86 | # 3. when make distclean is run |
| 87 | # Don't waste time on reading all Makefile.incs in these cases |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 88 | ifeq ($(strip $(HAVE_DOTCONFIG)),) |
Patrick Georgi | cf036d1 | 2010-04-21 06:36:20 +0000 | [diff] [blame] | 89 | NOCOMPILE:=1 |
| 90 | endif |
| 91 | ifneq ($(MAKECMDGOALS),) |
| 92 | ifneq ($(filter %config distclean,$(MAKECMDGOALS)),) |
| 93 | NOCOMPILE:=1 |
| 94 | endif |
| 95 | endif |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 96 | |
Patrick Georgi | cf036d1 | 2010-04-21 06:36:20 +0000 | [diff] [blame] | 97 | ifeq ($(NOCOMPILE),1) |
Patrick Georgi | e38d0a6 | 2011-03-01 08:09:22 +0000 | [diff] [blame] | 98 | include $(TOPLEVEL)/Makefile.inc |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 99 | real-all: config |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 100 | |
| 101 | else |
| 102 | |
Patrick Georgi | 977b985 | 2010-09-24 22:15:54 +0000 | [diff] [blame] | 103 | include $(HAVE_DOTCONFIG) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 104 | |
Patrick Georgi | 23d89cc | 2010-03-16 01:17:19 +0000 | [diff] [blame] | 105 | ifneq ($(INNER_SCANBUILD),y) |
| 106 | ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) |
| 107 | CC:=clang -m32 |
| 108 | HOSTCC:=clang |
| 109 | endif |
| 110 | endif |
| 111 | |
Patrick Georgi | 516a2a7 | 2010-03-25 21:45:25 +0000 | [diff] [blame] | 112 | ifeq ($(CONFIG_CCACHE),y) |
Patrick Georgi | 977b985 | 2010-09-24 22:15:54 +0000 | [diff] [blame] | 113 | CCACHE:=$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH)))) |
Patrick Georgi | 516a2a7 | 2010-03-25 21:45:25 +0000 | [diff] [blame] | 114 | ifeq ($(CCACHE),) |
| 115 | $(error ccache selected, but not found in PATH) |
| 116 | endif |
Patrick Georgi | 977b985 | 2010-09-24 22:15:54 +0000 | [diff] [blame] | 117 | CCACHE:=CCACHE_COMPILERCHECK=content CCACHE_BASEDIR=$(top) $(CCACHE) |
Patrick Georgi | 516a2a7 | 2010-03-25 21:45:25 +0000 | [diff] [blame] | 118 | CC := $(CCACHE) $(CC) |
| 119 | HOSTCC := $(CCACHE) $(HOSTCC) |
| 120 | HOSTCXX := $(CCACHE) $(HOSTCXX) |
| 121 | ROMCC := $(CCACHE) $(ROMCC) |
| 122 | endif |
| 123 | |
Patrick Georgi | a84e98b | 2010-03-16 19:01:32 +0000 | [diff] [blame] | 124 | strip_quotes = $(subst ",,$(subst \",,$(1))) |
| 125 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 126 | # The primary target needs to be here before we include the |
| 127 | # other files |
| 128 | |
Patrick Georgi | 020f51f | 2010-03-14 21:25:03 +0000 | [diff] [blame] | 129 | ifeq ($(INNER_SCANBUILD),y) |
| 130 | CONFIG_SCANBUILD_ENABLE:= |
| 131 | endif |
| 132 | |
| 133 | ifeq ($(CONFIG_SCANBUILD_ENABLE),y) |
| 134 | ifneq ($(CONFIG_SCANBUILD_REPORT_LOCATION),) |
| 135 | CONFIG_SCANBUILD_REPORT_LOCATION:=-o $(CONFIG_SCANBUILD_REPORT_LOCATION) |
| 136 | endif |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 137 | real-all: |
Patrick Georgi | 020f51f | 2010-03-14 21:25:03 +0000 | [diff] [blame] | 138 | echo '#!/bin/sh' > .ccwrap |
| 139 | echo 'CC="$(CC)"' >> .ccwrap |
| 140 | echo 'if [ "$$1" = "--hostcc" ]; then shift; CC="$(HOSTCC)"; fi' >> .ccwrap |
| 141 | echo 'if [ "$$1" = "--hostcxx" ]; then shift; CC="$(HOSTCXX)"; fi' >> .ccwrap |
| 142 | echo 'eval $$CC $$*' >> .ccwrap |
| 143 | chmod +x .ccwrap |
| 144 | scan-build $(CONFIG_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y |
| 145 | else |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 146 | real-all: real-target |
Patrick Georgi | 020f51f | 2010-03-14 21:25:03 +0000 | [diff] [blame] | 147 | endif |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 148 | |
Patrick Georgi | 51e142f | 2010-03-27 17:18:39 +0000 | [diff] [blame] | 149 | # must come rather early |
| 150 | .SECONDEXPANSION: |
| 151 | |
Stefan Reinauer | 1425add | 2010-03-21 22:35:58 +0000 | [diff] [blame] | 152 | $(obj)/config.h: |
| 153 | $(MAKE) oldconfig |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 154 | |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 155 | # Add a new class of source/object files to the build system |
| 156 | add-class= \ |
| 157 | $(eval $(1)-srcs:=) \ |
| 158 | $(eval $(1)-objs:=) \ |
| 159 | $(eval classes+=$(1)) |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 160 | |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 161 | # Special classes are managed types with special behaviour |
| 162 | # On parse time, for each entry in variable $(1)-y |
| 163 | # a handler $(1)-handler is executed with the arguments: |
| 164 | # * $(1): directory the parser is in |
| 165 | # * $(2): current entry |
| 166 | add-special-class= \ |
| 167 | $(eval $(1):=) \ |
| 168 | $(eval special-classes+=$(1)) |
| 169 | |
Patrick Georgi | 47d68d8 | 2010-03-06 21:18:43 +0000 | [diff] [blame] | 170 | # Clean -y variables, include Makefile.inc |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 171 | # Add paths to files in X-y to X-srcs |
Patrick Georgi | 47d68d8 | 2010-03-06 21:18:43 +0000 | [diff] [blame] | 172 | # Add subdirs-y to subdirs |
| 173 | includemakefiles= \ |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 174 | $(foreach class,classes subdirs $(classes) $(special-classes), $(eval $(class)-y:=)) \ |
Patrick Georgi | 47d68d8 | 2010-03-06 21:18:43 +0000 | [diff] [blame] | 175 | $(eval -include $(1)) \ |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 176 | $(foreach class,$(classes-y), $(call add-class,$(class))) \ |
| 177 | $(foreach class,$(classes), \ |
| 178 | $(eval $(class)-srcs+= \ |
Patrick Georgi | 51e142f | 2010-03-27 17:18:39 +0000 | [diff] [blame] | 179 | $$(subst $(top)/,, \ |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 180 | $$(abspath $$(addprefix $(dir $(1)),$$($(class)-y)))))) \ |
| 181 | $(foreach special,$(special-classes), \ |
| 182 | $(foreach item,$($(special)-y), $(call $(special)-handler,$(dir $(1)),$(item)))) \ |
Jonathan Kollasch | 7ff5b44 | 2010-09-28 21:11:48 +0000 | [diff] [blame] | 183 | $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y))))) |
Patrick Georgi | 47d68d8 | 2010-03-06 21:18:43 +0000 | [diff] [blame] | 184 | |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 185 | # For each path in $(subdirs) call includemakefiles |
Patrick Georgi | 47d68d8 | 2010-03-06 21:18:43 +0000 | [diff] [blame] | 186 | # Repeat until subdirs is empty |
| 187 | evaluate_subdirs= \ |
| 188 | $(eval cursubdirs:=$(subdirs)) \ |
| 189 | $(eval subdirs:=) \ |
| 190 | $(foreach dir,$(cursubdirs), \ |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 191 | $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ |
Patrick Georgi | 51e142f | 2010-03-27 17:18:39 +0000 | [diff] [blame] | 192 | $(if $(subdirs),$(eval $(call evaluate_subdirs))) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 193 | |
| 194 | # collect all object files eligible for building |
Patrick Georgi | e38d0a6 | 2011-03-01 08:09:22 +0000 | [diff] [blame] | 195 | subdirs:=$(TOPLEVEL) |
Patrick Georgi | 51e142f | 2010-03-27 17:18:39 +0000 | [diff] [blame] | 196 | $(eval $(call evaluate_subdirs)) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 197 | |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 198 | src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $($(1)-srcs)))) |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 199 | $(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class)))) |
Patrick Georgi | d3428b0 | 2010-02-24 13:18:01 +0000 | [diff] [blame] | 200 | |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 201 | allsrcs:=$(foreach var, $(addsuffix -srcs,$(classes)), $($(var))) |
| 202 | allobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var))) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 203 | alldirs:=$(sort $(abspath $(dir $(allobjs)))) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 204 | |
Patrick Georgi patrick.georgi | c5f773d | 2010-03-16 12:01:13 +0000 | [diff] [blame] | 205 | # macro to define template macros that are used by use_template macro |
| 206 | define create_cc_template |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 207 | # $1 obj class |
Patrick Georgi patrick.georgi | c5f773d | 2010-03-16 12:01:13 +0000 | [diff] [blame] | 208 | # $2 source suffix (c, S) |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 209 | # $3 additional compiler flags |
Patrick Georgi | b8cdd9b | 2011-02-17 20:48:45 +0000 | [diff] [blame] | 210 | ifn$(EMPTY)def $(1)-objs_$(2)_template |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 211 | de$(EMPTY)fine $(1)-objs_$(2)_template |
| 212 | $(obj)/$$(1).$(1).o: src/$$(1).$(2) $(obj)/config.h |
Patrick Georgi | 1cd76e7 | 2010-04-19 20:39:22 +0000 | [diff] [blame] | 213 | @printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 214 | $(CC) $(3) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$< |
Patrick Georgi patrick.georgi | c5f773d | 2010-03-16 12:01:13 +0000 | [diff] [blame] | 215 | en$(EMPTY)def |
Patrick Georgi | b8cdd9b | 2011-02-17 20:48:45 +0000 | [diff] [blame] | 216 | end$(EMPTY)if |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 217 | endef |
| 218 | |
Patrick Georgi | b8cdd9b | 2011-02-17 20:48:45 +0000 | [diff] [blame] | 219 | filetypes-of-class=$(subst .,,$(sort $(suffix $($(1)-srcs)))) |
| 220 | $(foreach class,$(classes), \ |
| 221 | $(foreach type,$(call filetypes-of-class,$(class)), \ |
| 222 | $(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-ccopts))))) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 223 | |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 224 | foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(subst src/,,$(basename $(file)))))) |
Patrick Georgi | 5826265 | 2011-02-17 20:47:49 +0000 | [diff] [blame] | 225 | $(eval $(foreach class,$(classes),$(call foreach-src,$(class)))) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 226 | |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 227 | DEPENDENCIES = $(allobjs:.o=.d) |
Stefan Reinauer | 6bee951 | 2010-03-24 15:51:48 +0000 | [diff] [blame] | 228 | -include $(DEPENDENCIES) |
| 229 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 230 | printall: |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 231 | @$(foreach class,$(classes),echo $(class)-objs:=$($(class)-objs); ) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 232 | @echo alldirs:=$(alldirs) |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 233 | @echo allsrcs=$(allsrcs) |
Stefan Reinauer | 6bee951 | 2010-03-24 15:51:48 +0000 | [diff] [blame] | 234 | @echo DEPENDENCIES=$(DEPENDENCIES) |
Stefan Reinauer | 68a564f | 2010-03-16 01:02:18 +0000 | [diff] [blame] | 235 | @echo LIBGCC_FILE_NAME=$(LIBGCC_FILE_NAME) |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 236 | @$(foreach class,$(special-classes),echo $(class):='$($(class))'; ) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 237 | |
| 238 | endif |
| 239 | |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 240 | $(shell mkdir -p $(obj) $(objutil)/kconfig/lxdialog $(additional-dirs) $(alldirs)) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 241 | |
Warren Turkal | a9fc330 | 2010-09-03 08:57:32 +0000 | [diff] [blame] | 242 | cscope: |
| 243 | cscope -bR |
| 244 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 245 | doxy: doxygen |
| 246 | doxygen: |
Stefan Reinauer | 1bbad5c | 2010-02-10 15:36:53 +0000 | [diff] [blame] | 247 | $(DOXYGEN) documentation/Doxyfile.coreboot |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 248 | |
| 249 | doxyclean: doxygen-clean |
| 250 | doxygen-clean: |
Patrick Georgi | 2b7418e | 2009-08-25 19:38:46 +0000 | [diff] [blame] | 251 | rm -rf $(DOXYGEN_OUTPUT_DIR) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 252 | |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 253 | clean-for-update: doxygen-clean clean-for-update-target |
| 254 | rm -f $(allobjs) .xcompile |
Stefan Reinauer | 6bee951 | 2010-03-24 15:51:48 +0000 | [diff] [blame] | 255 | rm -f $(DEPENDENCIES) |
Patrick Georgi | 2b7418e | 2009-08-25 19:38:46 +0000 | [diff] [blame] | 256 | rmdir -p $(alldirs) 2>/dev/null >/dev/null || true |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 257 | |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 258 | clean: clean-for-update clean-target |
| 259 | rm -f .ccwrap |
Warren Turkal | 0e8f204 | 2010-09-27 21:14:19 +0000 | [diff] [blame] | 260 | |
Warren Turkal | a9fc330 | 2010-09-03 08:57:32 +0000 | [diff] [blame] | 261 | clean-cscope: |
| 262 | rm -f cscope.out |
| 263 | |
Patrick Georgi | afbf072 | 2010-09-29 20:28:59 +0000 | [diff] [blame] | 264 | distclean: clean-cscope |
Myles Watson | 1af297c | 2010-01-06 16:59:18 +0000 | [diff] [blame] | 265 | rm -rf $(obj) |
Patrick Georgi | cf036d1 | 2010-04-21 06:36:20 +0000 | [diff] [blame] | 266 | rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 267 | |
Patrick Georgi | 71b8480 | 2011-02-22 14:35:05 +0000 | [diff] [blame] | 268 | .PHONY: $(PHONY) clean clean-cscope cscope distclean doxygen doxy .xcompile |