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#*************************************************************************
27
28PRJ = ..$/..$/..
29PRJNAME = bridges
30TARGET = test_javauno_any
31
32PACKAGE = test$/java_uno$/anytest
33
34ENABLE_EXCEPTIONS = TRUE
35
36.INCLUDE: settings.mk
37
38.IF "$(GUI)" == "WNT"
39GIVE_EXEC_RIGHTS = @echo
40.ELSE
41GIVE_EXEC_RIGHTS = chmod +x
42.ENDIF
43
44JAVAFILES = \
45    $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES)))
46
47# Make sure TestBed.class is found under $(CLASSDIR)$/test:
48.IF "$(XCLASSPATH)" == ""
49XCLASSPATH := $(CLASSDIR)$/test
50.ELSE
51XCLASSPATH !:= $(XCLASSPATH)$(PATH_SEPERATOR)$(CLASSDIR)$/test
52.ENDIF
53
54EXEC_CLASSPATH_TMP = \
55    $(foreach,i,$(JARFILES) $(SOLARBINDIR)$/$i)$(PATH_SEPERATOR)$(XCLASSPATH)
56EXEC_CLASSPATH = \
57    $(strip $(subst,!,$(PATH_SEPERATOR) $(EXEC_CLASSPATH_TMP:s/ /!/)))
58
59JARFILES = juh.jar jurt.jar ridl.jar
60JAVACLASSFILES = \
61    $(CLASSDIR)$/$(PACKAGE)$/TestAny.class \
62    $(CLASSDIR)$/$(PACKAGE)$/TestRemote.class \
63    $(CLASSDIR)$/$(PACKAGE)$/TestJni.class
64
65#--------------------------------------------------
66
67USE_DEFFILE = TRUE
68ENABLE_EXCEPTIONS = TRUE
69INCPRE += $(OUT)$/inc$/test
70
71.IF "$(debug)" != ""
72.IF "$(COM)" == "MSC"
73CFLAGS += -Ob0
74.ENDIF
75.ENDIF
76
77SLOFILES= \
78	$(SLO)$/transport.obj
79
80SHL1TARGET=$(TARGET)
81
82SHL1STDLIBS= \
83	$(CPPUHELPERLIB)		\
84	$(SALHELPERLIB)			\
85	$(JVMACCESSLIB)			\
86	$(CPPULIB)			\
87	$(SALLIB)
88
89SHL1VERSIONMAP=$(TARGET).map
90SHL1IMPLIB=i$(TARGET)
91SHL1LIBS=$(SLB)$/$(TARGET).lib
92SHL1DEF=$(MISC)$/$(SHL1TARGET).def
93DEF1NAME=$(SHL1TARGET)
94
95.INCLUDE: target.mk
96
97#--------------------------------------------------
98
99$(SLOFILES) : $(MISC)$/gen_files.flag
100$(JAVACLASSFILES) : $(MISC)$/gen_files.flag
101
102ALLTAR : \
103    $(OUT)$/bin$/TestRemote \
104    $(OUT)$/bin$/TestJni
105
106$(OUT)$/bin$/TestRemote : $(JAVACLASSFILES)
107    -rm -f $@
108    echo java -classpath ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \
109        test.java_uno.anytest.TestRemote > $@
110    $(GIVE_EXEC_RIGHTS) $@
111
112$(OUT)$/bin$/TestJni : $(JAVACLASSFILES)
113    -rm -f $@
114    echo '$(AUGMENT_LIBRARY_PATH)' java -classpath \
115        .$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \
116        -Djava.library.path=..$/lib test.java_uno.anytest.TestJni >> $@
117    $(GIVE_EXEC_RIGHTS) $@
118
119$(BIN)$/test_java_uno_anytest.rdb : types.idl
120	$(IDLC) -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $?
121	$(REGMERGE) $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)}
122
123$(MISC)$/gen_files.flag : $(BIN)$/test_java_uno_anytest.rdb
124	$(CPPUMAKER) -C -BUCR -O $(OUT)$/inc$/test -X $(SOLARBINDIR)$/udkapi.rdb $?
125	$(CPPUMAKER) -C -BUCR -O $(OUT)$/inc$/test -T com.sun.star.uno.XInterface $(SOLARBINDIR)$/udkapi.rdb
126	$(JAVAMAKER) -nD -BUCR -O $(CLASSDIR) -X $(SOLARBINDIR)$/udkapi.rdb $?
127	$(TOUCH) $@
128