xref: /AOO42X/main/pyuno/Executable_pyuno_python_exe.mk (revision 5e48fca7e524eb943907f0a8808aae8b4c4c7424)
1*58c70741SJim Jagielski#**************************************************************
2*58c70741SJim Jagielski#
3*58c70741SJim Jagielski#  Licensed to the Apache Software Foundation (ASF) under one
4*58c70741SJim Jagielski#  or more contributor license agreements.  See the NOTICE file
5*58c70741SJim Jagielski#  distributed with this work for additional information
6*58c70741SJim Jagielski#  regarding copyright ownership.  The ASF licenses this file
7*58c70741SJim Jagielski#  to you under the Apache License, Version 2.0 (the
8*58c70741SJim Jagielski#  "License"); you may not use this file except in compliance
9*58c70741SJim Jagielski#  with the License.  You may obtain a copy of the License at
10*58c70741SJim Jagielski#
11*58c70741SJim Jagielski#    http://www.apache.org/licenses/LICENSE-2.0
12*58c70741SJim Jagielski#
13*58c70741SJim Jagielski#  Unless required by applicable law or agreed to in writing,
14*58c70741SJim Jagielski#  software distributed under the License is distributed on an
15*58c70741SJim Jagielski#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*58c70741SJim Jagielski#  KIND, either express or implied.  See the License for the
17*58c70741SJim Jagielski#  specific language governing permissions and limitations
18*58c70741SJim Jagielski#  under the License.
19*58c70741SJim Jagielski#
20*58c70741SJim Jagielski#**************************************************************
21*58c70741SJim Jagielski
22*58c70741SJim Jagielskiinclude $(SRCDIR)/python/pyversion.mk
23*58c70741SJim Jagielski
24*58c70741SJim Jagielski$(eval $(call gb_Executable_Executable,pyuno_python_exe))
25*58c70741SJim Jagielski
26*58c70741SJim Jagielski$(eval $(call gb_Executable_set_include,pyuno_python_exe,\
27*58c70741SJim Jagielski    $$(INCLUDE) \
28*58c70741SJim Jagielski    -I$(WORKDIR)/CustomTarget/pyuno/zipcore \
29*58c70741SJim Jagielski))
30*58c70741SJim Jagielski
31*58c70741SJim Jagielski$(eval $(call gb_Executable_add_linked_libs,pyuno_python_exe,\
32*58c70741SJim Jagielski    sal \
33*58c70741SJim Jagielski    stl \
34*58c70741SJim Jagielski    $(gb_STDLIBS) \
35*58c70741SJim Jagielski))
36*58c70741SJim Jagielski
37*58c70741SJim Jagielski$(eval $(call gb_Executable_add_linked_libs,pyuno_python_exe,\
38*58c70741SJim Jagielski    user32 \
39*58c70741SJim Jagielski))
40*58c70741SJim Jagielski
41*58c70741SJim Jagielski$(eval $(call gb_Executable_add_linked_static_libs,pyuno_python_exe,\
42*58c70741SJim Jagielski    ooopathutils \
43*58c70741SJim Jagielski))
44*58c70741SJim Jagielski
45*58c70741SJim Jagielski$(eval $(call gb_Executable_add_exception_objects,pyuno_python_exe,\
46*58c70741SJim Jagielski    pyuno/zipcore/python \
47*58c70741SJim Jagielski))
48*58c70741SJim Jagielski
49*58c70741SJim Jagielski# Automatic dependency resolution fails; add it ourselves:
50*58c70741SJim Jagielski$(SRCDIR)/pyuno/zipcore/python.cxx : $(WORKDIR)/CustomTarget/pyuno/zipcore/pyversion.hxx
51*58c70741SJim Jagielski
52*58c70741SJim Jagielski$(WORKDIR)/CustomTarget/pyuno/zipcore/pyversion.hxx : $(SRCDIR)/pyuno/zipcore/pyversion.inc
53*58c70741SJim Jagielski    mkdir -p $(dir $@) && \
54*58c70741SJim Jagielski    sed "s/@/$(PYVERSION)/g" < $< > $@
55*58c70741SJim Jagielski
56*58c70741SJim Jagielski
57*58c70741SJim Jagielski
58*58c70741SJim Jagielski# FIXME: cannot specify custom executable path, so must build a wrongly named EXE and then re-deliver it to a different directory!
59*58c70741SJim Jagielski$(eval $(call gb_Package_Package,pyuno_python_exe,$(OUTDIR)))
60*58c70741SJim Jagielski$(eval $(call gb_Package_add_file,pyuno_python_exe,bin/pyuno/python.exe,bin/pyuno_python_exe.exe))
61*58c70741SJim Jagielski
62*58c70741SJim Jagielski
63*58c70741SJim Jagielski# vim: set noet sw=4 ts=4:
64