1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
35 ENABLE_EXCEPTIONS
=TRUE
37 LINKFLAGSDEFS
= # do not fail with missing symbols
39 # --- Settings -----------------------------------------------------
41 .INCLUDE
: settings.mk
42 .IF
"$(L10N_framework)"==""
43 #-------------------------------------------------------------------
45 .IF
"$(OS)$(CPU)$(COMEX)" == "SOLARISS4"
46 # no -Bdirect for SunWS CC
47 DIRECT
= $(LINKFLAGSDEFS
)
50 # special setting from environment
51 .IF
"$(EXTRA_CFLAGS)"!=""
52 EXTRA_FRAMEWORK_FLAG
=-framework Python
53 .ENDIF
# .IF "$(EXTRA_CFLAGS)"!=""
56 # python expects modules without the lib prefix
57 # pyuno.so even on Mac OS X, because it is a python module
58 PYUNO_MODULE
=$(DLLDEST
)$/pyuno.so
60 .ELIF
"$(GUI)" == "OS2"
61 .INCLUDE
: pyversion.mk
64 .INCLUDE
: pyversion.mk
69 .IF
"$(SYSTEM_PYTHON)" == "YES"
70 PYTHONLIB
=$(PYTHON_LIBS
)
71 CFLAGS
+=$(PYTHON_CFLAGS
)
72 .ELSE
# "$(SYSTEM_PYTHON)" == "YES"
73 .INCLUDE
: pyversion.mk
74 CFLAGS
+=-I
$(SOLARINCDIR
)$/python
75 .ENDIF
# "$(SYSTEM_PYTHON)" == "YES"
79 $(SLO
)$/pyuno_runtime.obj \
81 $(SLO
)$/pyuno_callable.obj \
82 $(SLO
)$/pyuno_module.obj \
83 $(SLO
)$/pyuno_type.obj \
84 $(SLO
)$/pyuno_util.obj \
85 $(SLO
)$/pyuno_except.obj \
86 $(SLO
)$/pyuno_adapter.obj \
89 # remove this, when issue i35064 is integrated
92 $(SLO
)$/pyuno_module.obj
93 .ENDIF
# "$(COM)"=="GCC"
101 $(EXTRA_FRAMEWORK_FLAG
)
104 SHL1LIBS
=$(SLB
)$/$(TARGET
).lib
105 SHL1IMPLIB
=i
$(TARGET
)
107 SHL1DEF
= $(MISC
)$/$(SHL1TARGET
).def
109 DEF1NAME
= $(SHL1TARGET
)
110 DEF1DEPN
= $(MISC
)$/pyuno.flt
112 DEFLIB1NAME
=$(TARGET
)
114 # --- Targets ------------------------------------------------------
116 .IF
"$(GUI)$(COM)"=="WNTGCC"
119 $(DLLDEST
)$/unohelper.py \
121 $(MISC
)$/$(PYUNORC
) \
122 $(LB
)$/lib
$(TARGET
).a
124 $(LB
)$/lib
$(TARGET
).a
: $(MISC
)$/$(TARGET
).def
125 dlltool
--dllname
$(TARGET
)$(DLLPOST
) --input-def
=$(MISC
)$/$(TARGET
).def
--kill-at
--output-lib
=$(LB
)$/lib
$(TARGET
).a
129 $(DLLDEST
)$/unohelper.py \
136 .IF
"$(L10N_framework)"==""
137 $(DLLDEST
)$/%.py
: %.py
141 .IF
"$(GUI)" == "UNX"
142 $(PYUNO_MODULE
) : $(SLO
)$/pyuno_dlopenwrapper.obj
143 .IF
"$(OS)" == "LINUX"
144 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSRUNPATH_OOO
) $(LINKFLAGSSHLCUI
) -ldl
-o
$@
$(SLO
)$/pyuno_dlopenwrapper.o
> $(MISC
)$/$(@
:b
).cmd
145 .ELIF
"$(OS)" == "SOLARIS"
146 @echo
ld -G
-ldl
-o
$@
$(SLO
)$/pyuno_dlopenwrapper.o
> $(MISC
)$/$(@
:b
).cmd
147 .ELIF
"$(OS)" == "FREEBSD"
148 @echo
ld -shared
-o
$@
$(SLO
)$/pyuno_dlopenwrapper.o
> $(MISC
)$/$(@
:b
).cmd
149 .ELIF
"$(OS)" == "NETBSD"
150 @echo
$(LINK
) $(LINKFLAGSSHLCUI
) -o
$@
$(SLO
)$/pyuno_dlopenwrapper.o
> $(MISC
)$/$(@
:b
).cmd
151 .ELIF
"$(OS)" == "MACOSX"
152 @echo
$(CC
) -bundle
-ldl
-o
$@
$(SLO
)$/pyuno_dlopenwrapper.o
$(EXTRA_LINKFLAGS
) $(EXTRA_FRAMEWORK_FLAG
) > $(MISC
)$/$(@
:b
).cmd
154 @echo
$(LINK
) $(LINKFLAGSSHLCUI
) -o
$@
$(SLO
)$/pyuno_dlopenwrapper.o
> $(MISC
)$/$(@
:b
).cmd
156 cat
$(MISC
)$/$(@
:b
).cmd
157 @
+source
$(MISC
)$/$(@
:b
).cmd
161 $(MISC
)$/$(PYUNORC
) : pyuno
165 $(MISC
)$/pyuno.flt
: pyuno.flt
168 .ENDIF
# L10N_framework