xref: /trunk/main/stoc/test/makefile.mk (revision 7871dc3e)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23PRJ=..
24
25PRJNAME=stoc
26TARGET=stoc
27TARGET1=testloader
28TARGET2=testregistry
29TARGET3=testsmgr
30TARGET4=testcorefl
31TARGET5=testinvocation
32TARGET6=testintrosp
33TARGET7=testconv
34TARGET8=testproxyfac
35TARGET9=testsmgr2
36TARGETTYPE=CUI
37#LIBTARGET=NO
38ENABLE_EXCEPTIONS=TRUE
39NO_BSYMBOLIC=TRUE
40
41# --- Settings -----------------------------------------------------
42
43.INCLUDE :  settings.mk
44
45# --- smgr component -----------------------------------------------
46SHL1OBJS= \
47	$(OBJ)$/testsmgr_cpnt.obj
48
49SHL1STDLIBS= \
50	$(CPPULIB) \
51	$(CPPUHELPERLIB) \
52	$(SALHELPERLIB) \
53	$(SALLIB)
54
55SHL1TARGET=testsmgr_component
56SHL1DEPN=
57SHL1IMPLIB=i$(SHL1TARGET)
58#SHL1LIBS=$(SLB)$/$(SHL1TARGET).lib
59SHL1DEF=$(MISC)$/$(SHL1TARGET).def
60DEF1NAME=$(SHL1TARGET)
61SHL1VERSIONMAP=testsmgr_cpnt.map
62
63# --- Application 1 ------------------------------------------------
64APP1TARGET= $(TARGET1)
65APP1OBJS=   $(OBJ)$/testloader.obj
66
67APP1STDLIBS= \
68		$(CPPULIB) 	\
69		$(CPPUHELPERLIB) 	\
70		$(SALHELPERLIB) 	\
71		$(SALLIB)
72
73# --- Application 2 ------------------------------------------------
74APP2TARGET= $(TARGET2)
75APP2OBJS=   $(OBJ)$/testregistry.obj $(OBJ)$/mergekeys_.obj
76
77APP2STDLIBS= \
78		$(CPPULIB)	\
79		$(CPPUHELPERLIB) 	\
80		$(SALHELPERLIB) 	\
81		$(REGLIB) 	\
82		$(SALLIB)
83
84# --- Application 3 - testsmgr main ------------------------------------
85APP3TARGET=	$(TARGET3)
86APP3OBJS  =	$(OBJ)$/testsmgr.obj
87APP3STDLIBS= \
88		$(CPPULIB)	\
89		$(CPPUHELPERLIB) 	\
90		$(SALHELPERLIB) 	\
91		$(REGLIB) 	\
92		$(SALLIB)
93
94.IF "$(GUI)"=="UNX"
95APP3STDLIBS+= -l$(SHL1TARGET)
96.ENDIF
97.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2"
98APP3STDLIBS+= i$(SHL1TARGET).lib
99.ENDIF
100
101# --- Application 4 - testcorefl main ------------------------------------
102APP4TARGET=	$(TARGET4)
103APP4OBJS  = 	$(OBJ)$/testcorefl.obj
104APP4STDLIBS= \
105		$(CPPULIB) 		\
106		$(CPPUHELPERLIB) 	\
107		$(SALLIB)
108
109# --- Application 5 - testinvocation main ------------------------------------
110APP5TARGET= 	$(TARGET5)
111APP5OBJS  = 	$(OBJ)$/testiadapter.obj
112APP5STDLIBS= \
113		$(CPPULIB) 		\
114		$(CPPUHELPERLIB) 	\
115		$(SALLIB)
116
117# --- Application 6 - testitrosp main ------------------------------------
118APP6TARGET= 	$(TARGET6)
119APP6OBJS  = 	$(OBJ)$/testintrosp.obj
120APP6STDLIBS= \
121		$(CPPULIB) 		\
122		$(CPPUHELPERLIB) 	\
123		$(SALHELPERLIB) 	\
124		$(SALLIB)
125
126# --- Application 7 - testconv main ------------------------------------
127APP7TARGET= 	$(TARGET7)
128APP7OBJS  = 	$(OBJ)$/testconv.obj
129APP7STDLIBS= \
130		$(CPPULIB) 		\
131		$(CPPUHELPERLIB) 	\
132		$(SALLIB)
133
134# --- Application 8 - testproxyfac main ------------------------------------
135APP8TARGET= 	$(TARGET8)
136APP8OBJS  = 	$(OBJ)$/testproxyfac.obj
137APP8STDLIBS= \
138		$(CPPULIB) 		\
139		$(CPPUHELPERLIB) 	\
140		$(SALLIB)
141
142# --- Application 9 - testproxyfac main ------------------------------------
143APP9TARGET= 	$(TARGET9)
144APP9OBJS  = 	$(OBJ)$/testsmgr2.obj
145APP9STDLIBS= \
146		$(CPPULIB) 		\
147		$(CPPUHELPERLIB) 	\
148		$(SALLIB)
149
150
151ALLIDLFILES:=	testcorefl.idl language_binding.idl testintrosp.idl
152
153
154# --- Target ------------------------------------------------
155
156.IF "$(depend)" == ""
157ALL : 	$(MISC)$/test_types_generated.flag \
158	$(BIN)$/test1.rdb 		   \
159	$(BIN)$/test2.rdb		   \
160	ALLTAR
161.ELSE
162ALL: 		ALLDEP
163.ENDIF
164
165.INCLUDE :	target.mk
166
167CPPUMAKERFLAGS =
168.IF "$(COM)" == "MSC"
169CPPUMAKERFLAGS = -L
170.ENDIF
171
172FACTORYTYPES:= 	-T com.sun.star.lang.XSingleComponentFactory \
173		-T com.sun.star.uno.XComponentContext \
174		-T com.sun.star.uno.XWeak \
175		-T com.sun.star.container.XEnumeration \
176		-T com.sun.star.lang.XComponent \
177		-T com.sun.star.registry.XSimpleRegistry \
178		-T com.sun.star.lang.XInitialization \
179		-T com.sun.star.lang.XMultiServiceFactory\
180		-T com.sun.star.loader.XImplementationLoader \
181		-T com.sun.star.registry.XImplementationRegistration \
182		-T com.sun.star.container.XSet \
183		-T com.sun.star.lang.XSingleServiceFactory\
184		-T com.sun.star.lang.XServiceInfo \
185		-T com.sun.star.container.XContentEnumerationAccess \
186		-T com.sun.star.container.XEnumeration
187
188TESTCOREFL:=ModuleC;ModuleC.XInterfaceA;ModuleC.XInterfaceB;ModuleA.XInterface1;com.sun.star.reflection.XIdlReflection;com.sun.star.reflection.XIdlField;com.sun.star.reflection.XIdlArray;com.sun.star.reflection.XIdlMethod;com.sun.star.reflection.XIdlClass;com.sun.star.beans.XPropertySet;com.sun.star.lang.XComponent;com.sun.star.container.XHierarchicalNameAccess;com.sun.star.reflection.XIdlField2;com.sun.star.lang.DisposedException
189TESTIADAPTER:=com.sun.star.beans.XIntrospection;com.sun.star.beans.MethodConcept;com.sun.star.beans.XExactName;com.sun.star.lang.XTypeProvider;com.sun.star.uno.XAggregation;com.sun.star.script.XInvocationAdapterFactory;com.sun.star.script.XInvocationAdapterFactory2;com.sun.star.script.XInvocation;com.sun.star.lang.XMultiServiceFactory;com.sun.star.registry.XSimpleRegistry;com.sun.star.lang.XInitialization;test.XLanguageBindingTest
190TESTINTROSP:=ModuleA;ModuleA.XIntroTest;com.sun.star.beans.XPropertySet;com.sun.star.container.XIndexAccess;com.sun.star.container.XNameAccess;com.sun.star.beans.PropertyAttribute;com.sun.star.beans.PropertyConcept
191TESTCONV:=com.sun.star.script.XTypeConverter
192TESTPROXYFAC:=com.sun.star.reflection.XProxyFactory
193TESTSECURITY:=com.sun.star.security.AllPermission;com.sun.star.security.XPolicy;com.sun.star.security.XAccessController;com.sun.star.io.FilePermission;com.sun.star.connection.SocketPermission;com.sun.star.uno.XCurrentContext
194
195$(BIN)$/test1.rdb: $(SHL1TARGETN)
196.IF "$(GUI)"=="UNX"
197    cp $(SHL1TARGETN) $(BIN)
198.ENDIF
199	cd $(BIN) && regcomp -register -r test1.rdb -c $(SHL1TARGET)
200
201$(BIN)$/test2.rdb:
202	cd $(BIN) && regcomp -register -r test2.rdb -c remotebridge.uno$(DLLPOST)
203
204$(BIN)$/stoctest.rdb: $(ALLIDLFILES)
205	idlc -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $?
206	regmerge $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)}
207	regmerge $@ / $(SOLARBINDIR)$/udkapi.rdb
208	regcomp -register -r $@ -c reflection.uno$(DLLPOST)
209	touch $@
210
211$(MISC)$/test_types_generated.flag : $(BIN)$/stoctest.rdb  makefile.mk
212	-rm -f $(MISC)$/test_types_generated.flag
213	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) $(FACTORYTYPES) -T"$(TESTIADAPTER)" $(BIN)$/stoctest.rdb
214	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TESTCOREFL)" $(BIN)$/stoctest.rdb
215	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TESTINTROSP)" $(BIN)$/stoctest.rdb
216	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TESTCONV)" $(BIN)$/stoctest.rdb
217	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TESTPROXYFAC)" $(BIN)$/stoctest.rdb
218	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TESTSECURITY)" $(BIN)$/stoctest.rdb
219	touch $(MISC)$/test_types_generated.flag
220