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
22include $(SRCDIR)/python/pyversion.mk
23
24$(eval $(call gb_Executable_Executable,pyuno_python_exe))
25
26$(eval $(call gb_Executable_set_include,pyuno_python_exe,\
27	$$(INCLUDE) \
28	-I$(WORKDIR)/CustomTarget/pyuno/zipcore \
29))
30
31$(eval $(call gb_Executable_add_linked_libs,pyuno_python_exe,\
32	sal \
33	stl \
34    $(gb_STDLIBS) \
35))
36
37$(eval $(call gb_Executable_add_linked_libs,pyuno_python_exe,\
38	user32 \
39))
40
41$(eval $(call gb_Executable_add_linked_static_libs,pyuno_python_exe,\
42	ooopathutils \
43))
44
45$(eval $(call gb_Executable_add_exception_objects,pyuno_python_exe,\
46	pyuno/zipcore/python \
47))
48
49# Automatic dependency resolution fails; add it ourselves:
50$(SRCDIR)/pyuno/zipcore/python.cxx : $(WORKDIR)/CustomTarget/pyuno/zipcore/pyversion.hxx
51
52$(WORKDIR)/CustomTarget/pyuno/zipcore/pyversion.hxx : $(SRCDIR)/pyuno/zipcore/pyversion.inc
53	mkdir -p $(dir $@) && \
54	sed "s/@/$(PYVERSION)/g" < $< > $@
55
56
57
58# FIXME: cannot specify custom executable path, so must build a wrongly named EXE and then re-deliver it to a different directory!
59$(eval $(call gb_Package_Package,pyuno_python_exe,$(OUTDIR)))
60$(eval $(call gb_Package_add_file,pyuno_python_exe,bin/pyuno/python.exe,bin/pyuno_python_exe.exe))
61
62
63# vim: set noet sw=4 ts=4:
64