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 $
11 # $Revision: 1.37.18.1 $
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 #*************************************************************************
37 ENABLE_EXCEPTIONS
=TRUE
42 DLLPRE
= # no leading "lib" on .so files
46 GIVE_EXEC_RIGHTS
=@echo
47 MY_URE_INTERNAL_JAVA_DIR
=$(strip $(subst,\
,/ file
:///$(shell @
$(WRAPCMD
) echo
$(SOLARBINDIR
))))
48 MY_LOCAL_CLASSDIR
=$(strip $(subst,\
,/ file
:///$(shell $(WRAPCMD
) echo
$(PWD
)$/$(CLASSDIR
))))
51 GIVE_EXEC_RIGHTS
=@echo
52 MY_URE_INTERNAL_JAVA_DIR
=$(strip $(subst,\
,/ file
:///$(shell @
$(WRAPCMD
) echo
$(SOLARBINDIR
))))
53 MY_LOCAL_CLASSDIR
=$(strip $(subst,\
,/ file
:///$(shell $(WRAPCMD
) echo
$(PWD
)$/$(CLASSDIR
))))
55 BATCH_INPROCESS
=bridgetest_inprocess
56 GIVE_EXEC_RIGHTS
=chmod
+x
57 MY_URE_INTERNAL_JAVA_DIR
=file
://$(SOLARBINDIR
)
58 MY_LOCAL_CLASSDIR
=file
://$(PWD
)$/$(CLASSDIR
)
62 .IF
"$(compcheck)" != ""
63 CFLAGSCXX
+= -DCOMPCHECK
68 $(SLO
)$/bridgetest.obj \
70 $(SLO
)$/currentcontextchecker.obj \
75 LIB1TARGET
=$(SLB
)$/cppobj.lib
77 $(SLO
)$/cppobj.obj
$(SLO
)$/currentcontextchecker.obj
$(SLO
)$/multi.obj
79 SHL1TARGET
= cppobj.uno
85 SHL1LIBS
= $(LIB1TARGET
)
86 SHL1DEF
= $(MISC
)$/$(SHL1TARGET
).def
87 DEF1NAME
= $(SHL1TARGET
)
88 .IF
"$(COMNAME)" == "gcc3"
89 SHL1VERSIONMAP
= component.gcc3.map
91 SHL1VERSIONMAP
= component.map
94 # ---- test object ----
96 LIB2TARGET
=$(SLB
)$/bridgetest.lib
98 $(SLO
)$/bridgetest.obj \
99 $(SLO
)$/currentcontextchecker.obj \
102 SHL2TARGET
= bridgetest.uno
108 SHL2LIBS
= $(LIB2TARGET
)
109 SHL2DEF
= $(MISC
)$/$(SHL2TARGET
).def
110 DEF2NAME
= $(SHL2TARGET
)
111 .IF
"$(COMNAME)" == "gcc3"
112 SHL2VERSIONMAP
= component.gcc3.map
114 SHL2VERSIONMAP
= component.map
117 SHL3TARGET
= constructors.uno
118 SHL3OBJS
= $(SLO
)$/constructors.obj
119 SHL3STDLIBS
= $(CPPULIB
) $(CPPUHELPERLIB
) $(SALLIB
)
120 SHL3VERSIONMAP
= component.map
121 SHL3IMPLIB
= i
$(SHL3TARGET
)
122 DEF3NAME
= $(SHL3TARGET
)
124 .IF
"$(SOLAR_JAVA)" != ""
125 JARFILES
= java_uno.jar jurt.jar ridl.jar
127 $(DLLDEST
)$/bridgetest_javaserver
$(BATCH_SUFFIX
) \
128 $(DLLDEST
)$/bridgetest_inprocess_java
$(BATCH_SUFFIX
)
131 # --- Targets ------------------------------------------------------
137 $(DLLDEST
)$/uno_types.rdb \
138 $(DLLDEST
)$/uno_services.rdb \
139 $(DLLDEST
)$/bridgetest_inprocess
$(BATCH_SUFFIX
) \
140 $(DLLDEST
)$/bridgetest_server
$(BATCH_SUFFIX
) \
141 $(DLLDEST
)$/bridgetest_client
$(BATCH_SUFFIX
) \
144 #################################################################
149 $(DLLDEST
)$/uno_types.rdb
: $(SOLARBINDIR
)$/udkapi.rdb
152 $(REGMERGE
) $@
/ $(BIN
)$/bridgetest.rdb
154 $(DLLDEST
)$/bridgetest_inprocess
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
155 .IF
"$(USE_SHELL)" == "bash"
156 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
157 -s com.sun.star.
test.bridge.BridgeTest
-- \
158 com.sun.star.
test.bridge.CppTestObject
> $@
160 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
162 $(GIVE_EXEC_RIGHTS
) $@
164 $(DLLDEST
)$/bridgetest_client
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
165 .IF
"$(USE_SHELL)" == "bash"
166 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
167 -s com.sun.star.
test.bridge.BridgeTest
-- \
168 -u
\''uno:socket,host=127.0.0.1,port=2002;urp;test'\' > $@
170 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
172 $(GIVE_EXEC_RIGHTS
) $@
174 $(DLLDEST
)$/bridgetest_server
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
175 .IF
"$(USE_SHELL)" == "bash"
176 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
177 -s com.sun.star.
test.bridge.CppTestObject \
178 -u
\''uno:socket,host=127.0.0.1,port=2002;urp;test'\' --singleaccept \
181 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
183 $(GIVE_EXEC_RIGHTS
) $@
186 .IF
"$(SOLAR_JAVA)" != ""
187 # jar-files, which regcomp needs so that it can use java
188 MY_JARS
=java_uno.jar ridl.jar jurt.jar juh.jar
190 # CLASSPATH, which regcomp needs to be run
191 MY_CLASSPATH_TMP
=$(foreach,i
,$(MY_JARS
) $(SOLARBINDIR
)$/$i)$(PATH_SEPERATOR
)$(XCLASSPATH
)
192 MY_CLASSPATH
=$(strip $(subst,!,$(PATH_SEPERATOR
) $(MY_CLASSPATH_TMP
:s
/ /!/)))$(PATH_SEPERATOR
)..
$/class
194 # Use "127.0.0.1" instead of "localhost", see #i32281#:
195 $(DLLDEST
)$/bridgetest_javaserver
$(BATCH_SUFFIX
) : makefile.mk
197 echo java
-classpath
"$(MY_CLASSPATH)$(PATH_SEPERATOR)..$/class$/testComponent.jar" \
198 com.sun.star.comp.bridge.TestComponentMain
\""uno:socket,host=127.0.0.1,port=2002;urp;test"\" singleaccept
> $@
199 $(GIVE_EXEC_RIGHTS
) $@
201 $(DLLDEST
)$/bridgetest_inprocess_java
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
202 .IF
"$(USE_SHELL)" == "bash"
203 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
204 -s com.sun.star.
test.bridge.BridgeTest \
205 -env
:URE_INTERNAL_JAVA_DIR
=$(MY_URE_INTERNAL_JAVA_DIR
) \
206 -- com.sun.star.
test.bridge.JavaTestObject noCurrentContext
> $@
208 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
210 $(GIVE_EXEC_RIGHTS
) $@
213 $(DLLDEST
)$/uno_services.rdb .ERRREMOVE
: $(DLLDEST
)$/uno_types.rdb \
214 $(DLLDEST
)$/bridgetest.uno
$(DLLPOST
) $(DLLDEST
)$/cppobj.uno
$(DLLPOST
) \
215 $(MISC
)$/$(TARGET
)$/bootstrap.rdb
$(SHL3TARGETN
)
217 $(REGCOMP
) -register
-br
$(DLLDEST
)$/uno_types.rdb \
218 -r
$(DLLDEST
)$/uno_services.rdb
-wop \
219 -c acceptor.uno
$(DLLPOST
) \
220 -c bridgefac.uno
$(DLLPOST
) \
221 -c connector.uno
$(DLLPOST
) \
222 -c remotebridge.uno
$(DLLPOST
) \
223 -c uuresolver.uno
$(DLLPOST
) \
224 -c stocservices.uno
$(DLLPOST
)
225 cd
$(DLLDEST
) && $(REGCOMP
) -register
-br uno_types.rdb \
226 -r uno_services.rdb
-wop
=.
/ \
227 -c .
$/bridgetest.uno
$(DLLPOST
) \
228 -c .
$/cppobj.uno
$(DLLPOST
) \
229 -c .
$/$(SHL3TARGETN
:f
)
230 .IF
"$(SOLAR_JAVA)" != ""
231 $(REGCOMP
) -register
-br
$(DLLDEST
)$/uno_types.rdb
-r
$@ \
232 -c javaloader.uno
$(DLLPOST
) -c javavm.uno
$(DLLPOST
)
233 $(REGCOMP
) -register
-br
$(MISC
)$/$(TARGET
)$/bootstrap.rdb
-r
$@
-c \
234 $(MY_LOCAL_CLASSDIR
)/testComponent.jar \
235 -env
:URE_INTERNAL_JAVA_DIR
=$(MY_URE_INTERNAL_JAVA_DIR
)
238 $(MISC
)$/$(TARGET
)$/bootstrap.rdb .ERRREMOVE
:
240 $(COPY
) $(SOLARBINDIR
)$/types.rdb
$@
241 .IF
"$(SOLAR_JAVA)" != ""
242 $(REGCOMP
) -register
-r
$@
-c javaloader.uno
$(DLLPOST
) \
243 -c javavm.uno
$(DLLPOST
) -c stocservices.uno
$(DLLPOST
)