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