1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2 #*************************************************************************
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 # Copyright 2000, 2011 Oracle and/or its affiliates.
8 # OpenOffice.org - a multi-platform office productivity suite
10 # This file is part of OpenOffice.org.
12 # OpenOffice.org is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU Lesser General Public License version 3
14 # only, as published by the Free Software Foundation.
16 # OpenOffice.org is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU Lesser General Public License version 3 for more details
20 # (a copy is included in the LICENSE file that accompanied this code).
22 # You should have received a copy of the GNU Lesser General Public License
23 # version 3 along with OpenOffice.org. If not, see
24 # <http://www.openoffice.org/license.html>
25 # for a copy of the LGPLv3 License.
27 #*************************************************************************
32 # gb_Executable_Executable_platform
34 .PHONY
: $(call gb_Executable_get_clean_target
,%)
35 $(call gb_Executable_get_clean_target
,%) :
36 $(call gb_Helper_abbreviate_dirs
,\
37 rm -f
$(call gb_Executable_get_target
,$*) \
40 $(call gb_Executable_get_target
,%) :
41 $(call gb_Helper_abbreviate_dirs
,\
42 $(call gb_Deliver_deliver
,$<,$@
) \
43 $(foreach target
,$(AUXTARGETS
), && $(call gb_Deliver_deliver
,$(dir $<)/$(notdir $(target
)),$(target
))))
45 define gb_Executable_Executable
46 ifeq (,$$(findstring $(1),$$(gb_Executable_KNOWN
)))
47 $$(eval
$$(call gb_Output_info
,Currently known executables
: $(sort $(gb_Executable_KNOWN
)),ALL
))
48 $$(eval
$$(call gb_Output_error
,Executable
$(1) must be registered in Repository.mk
))
50 $(call gb_Executable__Executable_impl
,$(1),Executable
/$(1)$(gb_Executable_EXT
))
54 define gb_Executable__Executable_impl
55 $(call gb_Executable_set_targettype_gui
,$(2))
56 $(call gb_LinkTarget_LinkTarget
,$(2))
57 $(call gb_LinkTarget_set_targettype
,$(2),Executable
)
58 $(call gb_Executable_get_target
,$(1)) : $(call gb_LinkTarget_get_target
,$(2)) \
59 |
$(dir $(call gb_Executable_get_target
,$(1))).
dir
60 $(call gb_Executable_get_clean_target
,$(1)) : $(call gb_LinkTarget_get_clean_target
,$(2))
61 $(call gb_Executable_Executable_platform
,$(1),$(2))
62 $$(eval
$$(call gb_Module_register_target
,$(call gb_Executable_get_target
,$(1)),$(call gb_Executable_get_clean_target
,$(1))))
63 $(call gb_Deliver_add_deliverable
,$(call gb_Executable_get_target
,$(1)),$(call gb_LinkTarget_get_target
,$(2)),$(1))
67 define gb_Executable_set_targettype_gui
68 $(call gb_LinkTarget_get_target
,Executable
/$(1)$(gb_Executable_EXT
)) : TARGETGUI
:= $(2)
72 define gb_Executable_forward_to_Linktarget
73 gb_Executable_
$(1) = $$(call gb_LinkTarget_
$(1),$$(call gb_Executable_get_linktargetname
,$$(1)),$$(2),$$(3),Executable_
$$(1))
77 $(eval
$(foreach method
,\
90 add_exception_objects \
91 add_noexception_objects \
92 add_generated_cobjects \
93 add_generated_cxxobjects \
94 add_generated_exception_objects \
109 set_library_path_flags \
114 add_internal_bootstrap_api \
115 use_internal_bootstrap_api \
116 add_internal_comprehensive_api \
117 use_internal_comprehensive_api \
120 add_linked_static_libs \
121 use_static_libraries \
126 add_package_headers \
131 set_warnings_not_errors \
133 $(call gb_Executable_forward_to_Linktarget
,$(method
))\
136 # vim: set noet sw=4: