1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24 25# PrecompiledHeader class 26 27ifeq ($(gb_ENABLE_PCH),$(true)) 28 29# gb_PrecompiledHeader_get_enableflags defined by platform 30ifeq ($(gb_DEBUGLEVEL),2) 31gb_PrecompiledHeader_DEBUGDIR := debug 32gb_NoexPrecompiledHeader_DEBUGDIR := debug 33else 34gb_PrecompiledHeader_DEBUGDIR := nodebug 35gb_NoexPrecompiledHeader_DEBUGDIR := nodebug 36endif 37 38$(call gb_PrecompiledHeader_get_dep_target,%) : 39 $(call gb_Helper_abbreviate_dirs,\ 40 mkdir -p $(dir $@) && \ 41 echo '$(call gb_PrecompiledHeader_get_target,$*) : $$(gb_Helper_PHONY)' > $@) 42 43$(call gb_NoexPrecompiledHeader_get_dep_target,%) : 44 $(call gb_Helper_abbreviate_dirs,\ 45 mkdir -p $(dir $@) && \ 46 echo '$(call gb_NoexPrecompiledHeader_get_target,$*) : $$(gb_Helper_PHONY)' > $@) 47 48$(call gb_PrecompiledHeader_get_target,%) : 49 $(call gb_PrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE)) 50 51$(call gb_NoexPrecompiledHeader_get_target,%) : 52 $(call gb_NoexPrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE)) 53 54.PHONY : $(call gb_PrecompiledHeader_get_clean_target,%) $(call gb_NoExPrecompiledHeader_get_clean_target,%) 55$(call gb_PrecompiledHeader_get_clean_target,%) : 56 $(call gb_Output_announce,$*,$(false),PCH,1) 57 -$(call gb_Helper_abbreviate_dirs,\ 58 rm -f $(call gb_PrecompiledHeader_get_target,$*) \ 59 $(call gb_PrecompiledHeader_get_target,$*).obj \ 60 $(call gb_PrecompiledHeader_get_target,$*).pdb \ 61 $(call gb_PrecompiledHeader_get_dep_target,$*)) 62 63 64$(call gb_NoexPrecompiledHeader_get_clean_target,%) : 65 $(call gb_Output_announce,$*,$(false),PCH,1) 66 -$(call gb_Helper_abbreviate_dirs,\ 67 rm -f $(call gb_NoexPrecompiledHeader_get_target,$*) \ 68 $(call gb_NoexPrecompiledHeader_get_target,$*).obj \ 69 $(call gb_NoexPrecompiledHeader_get_target,$*).pdb \ 70 $(call gb_NoexPrecompiledHeader_get_dep_target,$*)) 71endif 72 73# vim: set noet sw=4 ts=4: 74