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
41 .IF
"$(L10N_framework)"==""
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 ------------------------------------------------------
132 .ENDIF
# L10N_framework
135 .IF
"$(L10N_framework)"==""
138 $(DLLDEST
)$/uno_types.rdb \
139 $(DLLDEST
)$/uno_services.rdb \
140 $(DLLDEST
)$/bridgetest_inprocess
$(BATCH_SUFFIX
) \
141 $(DLLDEST
)$/bridgetest_server
$(BATCH_SUFFIX
) \
142 $(DLLDEST
)$/bridgetest_client
$(BATCH_SUFFIX
) \
145 #################################################################
150 $(DLLDEST
)$/uno_types.rdb
: $(SOLARBINDIR
)$/udkapi.rdb
153 $(REGMERGE
) $@
/ $(BIN
)$/bridgetest.rdb
155 $(DLLDEST
)$/bridgetest_inprocess
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
156 .IF
"$(USE_SHELL)" == "bash"
157 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
158 -s com.sun.star.
test.bridge.BridgeTest
-- \
159 com.sun.star.
test.bridge.CppTestObject
> $@
161 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
163 $(GIVE_EXEC_RIGHTS
) $@
165 $(DLLDEST
)$/bridgetest_client
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
166 .IF
"$(USE_SHELL)" == "bash"
167 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
168 -s com.sun.star.
test.bridge.BridgeTest
-- \
169 -u
\''uno:socket,host=127.0.0.1,port=2002;urp;test'\' > $@
171 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
173 $(GIVE_EXEC_RIGHTS
) $@
175 $(DLLDEST
)$/bridgetest_server
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
176 .IF
"$(USE_SHELL)" == "bash"
177 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
178 -s com.sun.star.
test.bridge.CppTestObject \
179 -u
\''uno:socket,host=127.0.0.1,port=2002;urp;test'\' --singleaccept \
182 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
184 $(GIVE_EXEC_RIGHTS
) $@
187 .IF
"$(SOLAR_JAVA)" != ""
188 # jar-files, which regcomp needs so that it can use java
189 MY_JARS
=java_uno.jar ridl.jar jurt.jar juh.jar
191 # CLASSPATH, which regcomp needs to be run
192 MY_CLASSPATH_TMP
=$(foreach,i
,$(MY_JARS
) $(SOLARBINDIR
)$/$i)$(PATH_SEPERATOR
)$(XCLASSPATH
)
193 MY_CLASSPATH
=$(strip $(subst,!,$(PATH_SEPERATOR
) $(MY_CLASSPATH_TMP
:s
/ /!/)))$(PATH_SEPERATOR
)..
$/class
195 # Use "127.0.0.1" instead of "localhost", see #i32281#:
196 $(DLLDEST
)$/bridgetest_javaserver
$(BATCH_SUFFIX
) : makefile.mk
198 echo java
-classpath
"$(MY_CLASSPATH)$(PATH_SEPERATOR)..$/class$/testComponent.jar" \
199 com.sun.star.comp.bridge.TestComponentMain
\""uno:socket,host=127.0.0.1,port=2002;urp;test"\" singleaccept
> $@
200 $(GIVE_EXEC_RIGHTS
) $@
202 $(DLLDEST
)$/bridgetest_inprocess_java
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
203 .IF
"$(USE_SHELL)" == "bash"
204 echo
'$(AUGMENT_LIBRARY_PATH)' uno
-ro uno_services.rdb
-ro uno_types.rdb \
205 -s com.sun.star.
test.bridge.BridgeTest \
206 -env
:URE_INTERNAL_JAVA_DIR
=$(MY_URE_INTERNAL_JAVA_DIR
) \
207 -- com.sun.star.
test.bridge.JavaTestObject noCurrentContext
> $@
209 echo ERROR
: this script can only be created properly for USE_SHELL
=bash
> $@
211 $(GIVE_EXEC_RIGHTS
) $@
214 $(DLLDEST
)$/uno_services.rdb .ERRREMOVE
: $(DLLDEST
)$/uno_types.rdb \
215 $(DLLDEST
)$/bridgetest.uno
$(DLLPOST
) $(DLLDEST
)$/cppobj.uno
$(DLLPOST
) \
216 $(MISC
)$/$(TARGET
)$/bootstrap.rdb
$(SHL3TARGETN
)
218 $(REGCOMP
) -register
-br
$(DLLDEST
)$/uno_types.rdb \
219 -r
$(DLLDEST
)$/uno_services.rdb
-wop \
220 -c acceptor.uno
$(DLLPOST
) \
221 -c bridgefac.uno
$(DLLPOST
) \
222 -c connector.uno
$(DLLPOST
) \
223 -c remotebridge.uno
$(DLLPOST
) \
224 -c uuresolver.uno
$(DLLPOST
) \
225 -c stocservices.uno
$(DLLPOST
)
226 cd
$(DLLDEST
) && $(REGCOMP
) -register
-br uno_types.rdb \
227 -r uno_services.rdb
-wop
=.
/ \
228 -c .
$/bridgetest.uno
$(DLLPOST
) \
229 -c .
$/cppobj.uno
$(DLLPOST
) \
230 -c .
$/$(SHL3TARGETN
:f
)
231 .IF
"$(SOLAR_JAVA)" != ""
232 $(REGCOMP
) -register
-br
$(DLLDEST
)$/uno_types.rdb
-r
$@ \
233 -c javaloader.uno
$(DLLPOST
) -c javavm.uno
$(DLLPOST
)
234 $(REGCOMP
) -register
-br
$(MISC
)$/$(TARGET
)$/bootstrap.rdb
-r
$@
-c \
235 $(MY_LOCAL_CLASSDIR
)/testComponent.jar \
236 -env
:URE_INTERNAL_JAVA_DIR
=$(MY_URE_INTERNAL_JAVA_DIR
)
239 $(MISC
)$/$(TARGET
)$/bootstrap.rdb .ERRREMOVE
:
241 $(COPY
) $(SOLARBINDIR
)$/types.rdb
$@
242 .IF
"$(SOLAR_JAVA)" != ""
243 $(REGCOMP
) -register
-r
$@
-c javaloader.uno
$(DLLPOST
) \
244 -c javavm.uno
$(DLLPOST
) -c stocservices.uno
$(DLLPOST
)
246 .ENDIF
# L10N_framework