xref: /trunk/main/pyuno/source/loader/makefile.mk (revision 7871dc3e)
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
22
23PRJ=..$/..
24
25PRJNAME=pyuno
26TARGET=pythonloader.uno
27ENABLE_EXCEPTIONS=TRUE
28
29# --- Settings -----------------------------------------------------
30
31.INCLUDE :  settings.mk
32.IF "$(L10N_framework)"==""
33DLLPRE =
34
35#-------------------------------------------------------------------
36
37.IF "$(OS)$(COMEX)" == "SOLARIS4"
38# no -Bdirect for SunWS CC
39DIRECT = $(LINKFLAGSDEFS)
40.ENDIF
41
42.IF "$(SYSTEM_PYTHON)" == "YES"
43PYTHONLIB=$(PYTHON_LIBS)
44CFLAGS+=$(PYTHON_CFLAGS)
45.IF "$(EXTRA_CFLAGS)"!=""
46PYTHONLIB+=-framework Python
47.ENDIF # "$(EXTRA_CFLAGS)"!=""
48.ELSE
49.INCLUDE :  pyversion.mk
50
51CFLAGS+=-I$(SOLARINCDIR)$/python
52.ENDIF
53
54SHL1TARGET=	$(TARGET)
55
56SHL1STDLIBS= \
57		$(CPPULIB)		\
58		$(CPPUHELPERLIB)	\
59		$(SALLIB)		\
60		$(PYUNOLIB)		\
61		$(PYTHONLIB)
62
63SHL1VERSIONMAP=$(SOLARENV)$/src$/component.map
64SHL1DEPN=
65SHL1IMPLIB=	i$(TARGET)
66SHL1LIBS=	$(SLB)$/$(TARGET).lib
67SHL1DEF=	$(MISC)$/$(SHL1TARGET).def
68
69DEF1NAME=	$(SHL1TARGET)
70SLOFILES=       $(SLO)$/pyuno_loader.obj
71
72# --- Targets ------------------------------------------------------
73
74ALL : ALLTAR \
75	$(DLLDEST)$/pythonloader.py
76.ENDIF # L10N_framework
77
78.INCLUDE :  target.mk
79.IF "$(L10N_framework)"==""
80$(DLLDEST)$/%.py: %.py
81	cp $? $@
82.ENDIF # L10N_framework
83
84ALLTAR : $(MISC)/pythonloader.component
85
86$(MISC)/pythonloader.component .ERRREMOVE : \
87        $(SOLARENV)/bin/createcomponent.xslt pythonloader.component
88    $(XSLTPROC) --nonet --stringparam uri \
89        'vnd.sun.star.expand:$$OOO_BASE_DIR/program/$(SHL1TARGETN:f)' -o $@ \
90        $(SOLARENV)/bin/createcomponent.xslt pythonloader.component
91