1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2011 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28# outdir target pattern
29
30gb_ComponentTarget_get_outdir_target = $(OUTDIR)/xml/component/$(1).component
31gb_Executable_get_target = $(OUTDIR)/bin/$(1)$(gb_Executable_EXT)
32gb_PackagePart_get_destinations = $(OUTDIR)/xml $(OUTDIR)/inc $(OUTDIR)/bin
33gb_PackagePart_get_target = $(OUTDIR)/$(1)
34gb_ResTarget_get_outdir_imagelist_target = $(OUTDIR)/res/img/$(1).ilst
35gb_ResTarget_get_outdir_target = $(OUTDIR)/bin/$(1).res
36
37define gb_Library_get_target
38$(patsubst $(1):%,$(gb_Library_OUTDIRLOCATION)/%,$(filter $(filter $(1),$(gb_Library_TARGETS)):%,$(gb_Library_FILENAMES)))
39endef
40
41define gb_StaticLibrary_get_target
42$(patsubst $(1):%,$(gb_StaticLibrary_OUTDIRLOCATION)/%,$(filter $(filter $(1),$(gb_StaticLibrary_TARGETS)):%,$(gb_StaticLibrary_FILENAMES)))
43endef
44
45
46# workdir target patterns
47
48gb_AllLangResTarget_get_target = $(WORKDIR)/AllLangRes/$(1)
49gb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
50gb_ComponentTarget_get_target = $(WORKDIR)/ComponentTarget/$(1).component
51gb_CppunitTest_get_target = $(WORKDIR)/CppunitTest/$(1).test
52gb_CustomTarget_get_repo_target = $(WORKDIR)/CustomTarget/$(2)_$(1).done
53gb_CustomTarget_get_target = $(WORKDIR)/CustomTarget/$(1).done
54gb_CustomTarget_get_workdir = $(WORKDIR)/CustomTarget/$(1)
55gb_CxxObject_get_target = $(WORKDIR)/CxxObject/$(1).o
56gb_GenCxxObject_get_target = $(WORKDIR)/GenCxxObject/$(1).o
57gb_Executable_get_external_headers_target = $(WORKDIR)/ExternalHeaders/Executable/$(1)
58gb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
59gb_JavaClassSet_get_classdir = $(WORKDIR)/JavaClassSet/$(1)
60gb_JavaClassSet_get_repo_target = $(WORKDIR)/JavaClassSet/$(2)/$(1).done
61gb_JavaClassSet_get_target = $(WORKDIR)/JavaClassSet/$(1)/done
62gb_JunitTest_get_classsetname = JunitTest/$(1)
63gb_JunitTest_get_target = $(WORKDIR)/JunitTest/$(1)/done
64gb_JunitTest_get_userdir = $(WORKDIR)/JunitTest/$(1)/user
65gb_LinkTarget_get_external_headers_target = $(WORKDIR)/ExternalHeaders/$(1)
66gb_LinkTarget_get_headers_target = $(WORKDIR)/Headers/$(1)
67gb_LinkTarget_get_target = $(WORKDIR)/LinkTarget/$(1)
68gb_Module_get_check_target = $(WORKDIR)/Module/check/$(1)
69gb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1)
70gb_Module_get_target = $(WORKDIR)/Module/$(1)
71gb_NoexPrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
72gb_NoexPrecompiledHeader_get_target = $(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
73gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
74gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
75gb_Package_get_target = $(WORKDIR)/Package/$(1)
76gb_PrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
77gb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
78gb_ResTarget_get_imagelist_target = $(WORKDIR)/ResTarget/$(1).ilst
79gb_ResTarget_get_target = $(WORKDIR)/ResTarget/$(1).res
80gb_SdiTarget_get_target = $(WORKDIR)/SdiTarget/$(1)
81gb_SrsPartMergeTarget_get_target = $(WORKDIR)/SrsPartMergeTarget/$(1)
82gb_SrsPartTarget_get_target = $(WORKDIR)/SrsPartTarget/$(1)
83gb_SrsTarget_get_target = $(WORKDIR)/SrsTarget/$(1).srs
84gb_WinResTarget_get_target = $(WORKDIR)/WinResTarget/$(1)$(gb_WinResTarget_POSTFIX)
85
86define gb_Library_get_external_headers_target
87$(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
88endef
89
90define gb_Library_get_headers_target
91$(patsubst $(1):%,$(WORKDIR)/Headers/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
92endef
93
94define gb_StaticLibrary_get_external_headers_target
95$(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/StaticLibrary/%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
96endef
97
98define gb_StaticLibrary_get_headers_target
99$(patsubst $(1):%,$(WORKDIR)/Headers/StaticLibrary/%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
100endef
101
102$(eval $(call gb_Helper_make_clean_targets,\
103	AllLangResTarget \
104	ComponentTarget \
105	JavaClassSet \
106	JunitTest \
107	LinkTarget \
108	Module \
109	WinResTarget \
110	NoexPrecompiledHeader \
111	PackagePart \
112	PrecompiledHeader \
113	ResTarget \
114	SdiTarget \
115	SrsTarget \
116	CppunitTest \
117	CustomTarget \
118))
119
120$(eval $(call gb_Helper_make_outdir_clean_targets,\
121	Executable \
122	Library \
123	Package \
124	StaticLibrary \
125))
126
127$(eval $(call gb_Helper_make_dep_targets,\
128	CObject \
129	CxxObject \
130	ObjCxxObject \
131	LinkTarget \
132	SrsPartTarget \
133	SrsTarget \
134))
135# needs to use same dep target because we use gb_CxxObject__command
136gb_GenCxxObject_get_dep_target = $(gb_CxxObject_get_dep_target)
137
138# other getters
139
140define gb_Library_get_layer
141$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_LAYER)))
142endef
143
144define gb_Executable_get_layer
145$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Executable_LAYER)))
146endef
147
148define gb_Library_get_filename
149$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES)))
150endef
151
152define gb_StaticLibrary_get_filename
153$(patsubst $(1):%,%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
154endef
155
156
157# static members declared here because they are used globally
158
159gb_Library_OUTDIRLOCATION = $(OUTDIR)/lib
160gb_Library_DLLDIR = $(WORKDIR)/LinkTarget/Library
161gb_CppunitTest_DLLDIR = $(WORKDIR)/LinkTarget/CppunitTest
162gb_StaticLibrary_OUTDIRLOCATION = $(OUTDIR)/lib
163
164# vim: set noet sw=4 ts=4:
165