1*7871dc3eSAndrew Rist#**************************************************************
2*7871dc3eSAndrew Rist#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*7871dc3eSAndrew Rist#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*7871dc3eSAndrew Rist#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19*7871dc3eSAndrew Rist#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir# outdir target pattern
25cdf0e10cSrcweir
26cdf0e10cSrcweirgb_ComponentTarget_get_outdir_target = $(OUTDIR)/xml/component/$(1).component
27cdf0e10cSrcweirgb_Executable_get_target = $(OUTDIR)/bin/$(1)$(gb_Executable_EXT)
28cdf0e10cSrcweirgb_PackagePart_get_destinations = $(OUTDIR)/xml $(OUTDIR)/inc $(OUTDIR)/bin
29cdf0e10cSrcweirgb_PackagePart_get_target = $(OUTDIR)/$(1)
30cdf0e10cSrcweirgb_ResTarget_get_outdir_imagelist_target = $(OUTDIR)/res/img/$(1).ilst
31cdf0e10cSrcweirgb_ResTarget_get_outdir_target = $(OUTDIR)/bin/$(1).res
32cdf0e10cSrcweir
33cdf0e10cSrcweirdefine gb_Library_get_target
34cdf0e10cSrcweir$(patsubst $(1):%,$(gb_Library_OUTDIRLOCATION)/%,$(filter $(filter $(1),$(gb_Library_TARGETS)):%,$(gb_Library_FILENAMES)))
35cdf0e10cSrcweirendef
36cdf0e10cSrcweir
37cdf0e10cSrcweirdefine gb_StaticLibrary_get_target
38cdf0e10cSrcweir$(patsubst $(1):%,$(gb_StaticLibrary_OUTDIRLOCATION)/%,$(filter $(filter $(1),$(gb_StaticLibrary_TARGETS)):%,$(gb_StaticLibrary_FILENAMES)))
39cdf0e10cSrcweirendef
40cdf0e10cSrcweir
41cdf0e10cSrcweir
42cdf0e10cSrcweir# workdir target patterns
43cdf0e10cSrcweir
44cdf0e10cSrcweirgb_AllLangResTarget_get_target = $(WORKDIR)/AllLangRes/$(1)
45cdf0e10cSrcweirgb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
46cdf0e10cSrcweirgb_ComponentTarget_get_target = $(WORKDIR)/ComponentTarget/$(1).component
47cdf0e10cSrcweirgb_CppunitTest_get_target = $(WORKDIR)/CppunitTest/$(1).test
48cdf0e10cSrcweirgb_CustomTarget_get_repo_target = $(WORKDIR)/CustomTarget/$(2)_$(1).done
49cdf0e10cSrcweirgb_CustomTarget_get_target = $(WORKDIR)/CustomTarget/$(1).done
50cdf0e10cSrcweirgb_CustomTarget_get_workdir = $(WORKDIR)/CustomTarget/$(1)
51cdf0e10cSrcweirgb_CxxObject_get_target = $(WORKDIR)/CxxObject/$(1).o
52cdf0e10cSrcweirgb_GenCxxObject_get_target = $(WORKDIR)/GenCxxObject/$(1).o
53cdf0e10cSrcweirgb_Executable_get_external_headers_target = $(WORKDIR)/ExternalHeaders/Executable/$(1)
54cdf0e10cSrcweirgb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
55cdf0e10cSrcweirgb_JavaClassSet_get_classdir = $(WORKDIR)/JavaClassSet/$(1)
56cdf0e10cSrcweirgb_JavaClassSet_get_repo_target = $(WORKDIR)/JavaClassSet/$(2)/$(1).done
57cdf0e10cSrcweirgb_JavaClassSet_get_target = $(WORKDIR)/JavaClassSet/$(1)/done
58cdf0e10cSrcweirgb_JunitTest_get_classsetname = JunitTest/$(1)
59cdf0e10cSrcweirgb_JunitTest_get_target = $(WORKDIR)/JunitTest/$(1)/done
60cdf0e10cSrcweirgb_JunitTest_get_userdir = $(WORKDIR)/JunitTest/$(1)/user
61cdf0e10cSrcweirgb_LinkTarget_get_external_headers_target = $(WORKDIR)/ExternalHeaders/$(1)
62cdf0e10cSrcweirgb_LinkTarget_get_headers_target = $(WORKDIR)/Headers/$(1)
63cdf0e10cSrcweirgb_LinkTarget_get_target = $(WORKDIR)/LinkTarget/$(1)
64cdf0e10cSrcweirgb_Module_get_check_target = $(WORKDIR)/Module/check/$(1)
65cdf0e10cSrcweirgb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1)
66cdf0e10cSrcweirgb_Module_get_target = $(WORKDIR)/Module/$(1)
67cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
68cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_target = $(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
69cdf0e10cSrcweirgb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
70cdf0e10cSrcweirgb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
71cdf0e10cSrcweirgb_Package_get_target = $(WORKDIR)/Package/$(1)
72cdf0e10cSrcweirgb_PrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
73cdf0e10cSrcweirgb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
74cdf0e10cSrcweirgb_ResTarget_get_imagelist_target = $(WORKDIR)/ResTarget/$(1).ilst
75cdf0e10cSrcweirgb_ResTarget_get_target = $(WORKDIR)/ResTarget/$(1).res
76cdf0e10cSrcweirgb_SdiTarget_get_target = $(WORKDIR)/SdiTarget/$(1)
77cdf0e10cSrcweirgb_SrsPartMergeTarget_get_target = $(WORKDIR)/SrsPartMergeTarget/$(1)
78cdf0e10cSrcweirgb_SrsPartTarget_get_target = $(WORKDIR)/SrsPartTarget/$(1)
79cdf0e10cSrcweirgb_SrsTarget_get_target = $(WORKDIR)/SrsTarget/$(1).srs
80cdf0e10cSrcweirgb_WinResTarget_get_target = $(WORKDIR)/WinResTarget/$(1)$(gb_WinResTarget_POSTFIX)
81cdf0e10cSrcweir
82cdf0e10cSrcweirdefine gb_Library_get_external_headers_target
83cdf0e10cSrcweir$(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
84cdf0e10cSrcweirendef
85cdf0e10cSrcweir
86cdf0e10cSrcweirdefine gb_Library_get_headers_target
87cdf0e10cSrcweir$(patsubst $(1):%,$(WORKDIR)/Headers/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
88cdf0e10cSrcweirendef
89cdf0e10cSrcweir
90cdf0e10cSrcweirdefine gb_StaticLibrary_get_external_headers_target
91cdf0e10cSrcweir$(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/StaticLibrary/%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
92cdf0e10cSrcweirendef
93cdf0e10cSrcweir
94cdf0e10cSrcweirdefine gb_StaticLibrary_get_headers_target
95cdf0e10cSrcweir$(patsubst $(1):%,$(WORKDIR)/Headers/StaticLibrary/%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
96cdf0e10cSrcweirendef
97cdf0e10cSrcweir
98cdf0e10cSrcweir$(eval $(call gb_Helper_make_clean_targets,\
99cdf0e10cSrcweir	AllLangResTarget \
100cdf0e10cSrcweir	ComponentTarget \
101cdf0e10cSrcweir	JavaClassSet \
102cdf0e10cSrcweir	JunitTest \
103cdf0e10cSrcweir	LinkTarget \
104cdf0e10cSrcweir	Module \
105cdf0e10cSrcweir	WinResTarget \
106cdf0e10cSrcweir	NoexPrecompiledHeader \
107cdf0e10cSrcweir	PackagePart \
108cdf0e10cSrcweir	PrecompiledHeader \
109cdf0e10cSrcweir	ResTarget \
110cdf0e10cSrcweir	SdiTarget \
111cdf0e10cSrcweir	SrsTarget \
112cdf0e10cSrcweir	CppunitTest \
113cdf0e10cSrcweir	CustomTarget \
114cdf0e10cSrcweir))
115cdf0e10cSrcweir
116cdf0e10cSrcweir$(eval $(call gb_Helper_make_outdir_clean_targets,\
117cdf0e10cSrcweir	Executable \
118cdf0e10cSrcweir	Library \
119cdf0e10cSrcweir	Package \
120cdf0e10cSrcweir	StaticLibrary \
121cdf0e10cSrcweir))
122cdf0e10cSrcweir
123cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\
124cdf0e10cSrcweir	CObject \
125cdf0e10cSrcweir	CxxObject \
126cdf0e10cSrcweir	ObjCxxObject \
127cdf0e10cSrcweir	LinkTarget \
128cdf0e10cSrcweir	SrsPartTarget \
129cdf0e10cSrcweir	SrsTarget \
130cdf0e10cSrcweir))
131cdf0e10cSrcweir# needs to use same dep target because we use gb_CxxObject__command
132cdf0e10cSrcweirgb_GenCxxObject_get_dep_target = $(gb_CxxObject_get_dep_target)
133cdf0e10cSrcweir
134cdf0e10cSrcweir# other getters
135cdf0e10cSrcweir
136cdf0e10cSrcweirdefine gb_Library_get_layer
137cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_LAYER)))
138cdf0e10cSrcweirendef
139cdf0e10cSrcweir
140cdf0e10cSrcweirdefine gb_Executable_get_layer
141cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Executable_LAYER)))
142cdf0e10cSrcweirendef
143cdf0e10cSrcweir
144cdf0e10cSrcweirdefine gb_Library_get_filename
145cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES)))
146cdf0e10cSrcweirendef
147cdf0e10cSrcweir
148cdf0e10cSrcweirdefine gb_StaticLibrary_get_filename
149cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
150cdf0e10cSrcweirendef
151cdf0e10cSrcweir
152cdf0e10cSrcweir
153cdf0e10cSrcweir# static members declared here because they are used globally
154cdf0e10cSrcweir
155cdf0e10cSrcweirgb_Library_OUTDIRLOCATION = $(OUTDIR)/lib
156cdf0e10cSrcweirgb_Library_DLLDIR = $(WORKDIR)/LinkTarget/Library
157cdf0e10cSrcweirgb_CppunitTest_DLLDIR = $(WORKDIR)/LinkTarget/CppunitTest
158cdf0e10cSrcweirgb_StaticLibrary_OUTDIRLOCATION = $(OUTDIR)/lib
159cdf0e10cSrcweir
160cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
161