1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 # PrecompiledHeader class
23 ifeq ($(gb_ENABLE_PCH
),$(true
))
25 # gb_PrecompiledHeader_get_enableflags defined by platform
26 ifneq ($(strip $(gb_DEBUGLEVEL
)$(gb_SYMBOLS
)),0)
27 gb_PrecompiledHeader_DEBUGDIR
:= debug
29 gb_PrecompiledHeader_DEBUGDIR
:= nodebug
32 $(call gb_PrecompiledHeader_get_dep_target
,%) :
33 $(call gb_Helper_abbreviate_dirs
,\
34 mkdir
-p
$(dir $@
) && \
35 echo
"$(call gb_PrecompiledHeader_get_target,$*) : $(gb_Helper_PHONY)" > $@
)
37 $(call gb_PrecompiledHeader_get_target
,%) :
39 $(call gb_PrecompiledHeader__command
,$@
,$*,$<,$(PCH_DEFS
),$(PCH_CXXFLAGS
) $(gb_PrecompiledHeader_EXCEPTIONFLAGS
),$(INCLUDE
))
41 .PHONY
: $(call gb_PrecompiledHeader_get_clean_target
,%)
42 $(call gb_PrecompiledHeader_get_clean_target
,%) :
43 $(call gb_Output_announce
,$*,$(false
),PCH
,1)
44 -$(call gb_Helper_abbreviate_dirs
,\
45 rm -f
$(call gb_PrecompiledHeader_get_target
,$*) \
46 $(call gb_PrecompiledHeader_get_target
,$*).obj \
47 $(call gb_PrecompiledHeader_get_target
,$*).pdb \
48 $(call gb_PrecompiledHeader_get_timestamp
,$*) \
49 $(call gb_PrecompiledHeader_get_dep_target
,$*))
53 $(call gb_PrecompiledHeader_get_timestamp
,%) :
54 mkdir
-p
$(dir $@
) && touch
$@