xref: /aoo41x/main/cppuhelper/test/makefile.mk (revision 7871dc3e)
1*7871dc3eSAndrew Rist#**************************************************************
2*7871dc3eSAndrew Rist#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*7871dc3eSAndrew Rist#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*7871dc3eSAndrew Rist#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19*7871dc3eSAndrew Rist#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew Rist
23cdf0e10cSrcweirPRJ=..
24cdf0e10cSrcweir
25cdf0e10cSrcweirPRJNAME=cppuhelper
26cdf0e10cSrcweirTARGET=testhelper
27cdf0e10cSrcweirENABLE_EXCEPTIONS=TRUE
28cdf0e10cSrcweirUSE_DEFFILE=TRUE
29cdf0e10cSrcweir
30cdf0e10cSrcweir# --- Settings -----------------------------------------------------
31cdf0e10cSrcweir
32cdf0e10cSrcweir.INCLUDE :  settings.mk
33cdf0e10cSrcweir
34cdf0e10cSrcweir# --- Files --------------------------------------------------------
35cdf0e10cSrcweir
36cdf0e10cSrcweirUNOUCRDEP=	$(SOLARBINDIR)$/udkapi.rdb
37cdf0e10cSrcweirUNOUCRRDB=	$(SOLARBINDIR)$/udkapi.rdb
38cdf0e10cSrcweirUNOUCROUT=	$(OUT)$/inc$/test
39cdf0e10cSrcweirINCPRE+=	$(OUT)$/inc$/test
40cdf0e10cSrcweir
41cdf0e10cSrcweirOBJFILES=	\
42cdf0e10cSrcweir		$(OBJ)$/testhelper.obj		\
43cdf0e10cSrcweir		$(OBJ)$/testpropshlp.obj 	\
44cdf0e10cSrcweir		$(OBJ)$/testidlclass.obj 	\
45cdf0e10cSrcweir		$(OBJ)$/testproptyphlp.obj	\
46cdf0e10cSrcweir		$(OBJ)$/testimplhelper.obj \
47cdf0e10cSrcweir		$(OBJ)$/testcontainer.obj
48cdf0e10cSrcweir
49cdf0e10cSrcweirAPP1TARGET=$(TARGET)
50cdf0e10cSrcweirAPP1OBJS=$(OBJFILES)
51cdf0e10cSrcweir
52cdf0e10cSrcweirAPP1STDLIBS+=	\
53cdf0e10cSrcweir		$(CPPULIB)	\
54cdf0e10cSrcweir		$(CPPUHELPERLIB) \
55cdf0e10cSrcweir		$(SALLIB)
56cdf0e10cSrcweir
57cdf0e10cSrcweirAPP1DEF=	$(MISC)$/$(APP1TARGET).def
58cdf0e10cSrcweir
59cdf0e10cSrcweir#############################################
60cdf0e10cSrcweir
61cdf0e10cSrcweirAPP2OBJS = $(OBJ)$/testdefaultbootstrapping.obj
62cdf0e10cSrcweirAPP2STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
63cdf0e10cSrcweirAPP2TARGET = testdefaultbootstrapping
64cdf0e10cSrcweir
65cdf0e10cSrcweir#############################################
66cdf0e10cSrcweir
67cdf0e10cSrcweirSLOFILES= \
68cdf0e10cSrcweir		$(SLO)$/cfg_test.obj
69cdf0e10cSrcweirLIB1TARGET=$(SLB)$/cfg_test.lib
70cdf0e10cSrcweirLIB1OBJFILES=$(SLOFILES)
71cdf0e10cSrcweir
72cdf0e10cSrcweir
73cdf0e10cSrcweirAPP3OBJS = $(OBJ)$/cfg_test.obj
74cdf0e10cSrcweirAPP3STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
75cdf0e10cSrcweirAPP3TARGET = test_cfg
76cdf0e10cSrcweir
77cdf0e10cSrcweir#############################################
78cdf0e10cSrcweir
79cdf0e10cSrcweirALLIDLFILES:=	helpertest.idl
80cdf0e10cSrcweir
81cdf0e10cSrcweir# --- Targets ------------------------------------------------------
82cdf0e10cSrcweir
83cdf0e10cSrcweir.IF "$(depend)" == ""
84cdf0e10cSrcweirALL: $(BIN)$/cpputest.rdb				\
85cdf0e10cSrcweir	 unoheader 					\
86cdf0e10cSrcweir	 $(BIN)$/testrc 				\
87cdf0e10cSrcweir	 $(BIN)$/testdefaultbootstrapping.pl		\
88cdf0e10cSrcweir	ALLTAR 						\
89cdf0e10cSrcweir	 $(BIN)$/$(APP2TARGET).bin  			\
90cdf0e10cSrcweir	 $(BIN)$/$(APP2TARGET).Bin  			\
91cdf0e10cSrcweir	 $(BIN)$/$(APP2TARGET).Exe
92cdf0e10cSrcweir
93cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
94cdf0e10cSrcweirALL:  $(BIN)$/$(APP2TARGET).exe
95cdf0e10cSrcweir
96cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).exe : $(APP2TARGETN)
97cdf0e10cSrcweir	cp $(APP2TARGETN) $@
98cdf0e10cSrcweir
99cdf0e10cSrcweir.ENDIF
100cdf0e10cSrcweir
101cdf0e10cSrcweir
102cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).bin : $(APP2TARGETN)
103cdf0e10cSrcweir	cp $(APP2TARGETN) $@
104cdf0e10cSrcweir
105cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).Bin : $(APP2TARGETN)
106cdf0e10cSrcweir	cp $(APP2TARGETN) $@
107cdf0e10cSrcweir
108cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).Exe : $(APP2TARGETN)
109cdf0e10cSrcweir	cp $(APP2TARGETN) $@
110cdf0e10cSrcweir
111cdf0e10cSrcweir.ELSE
112cdf0e10cSrcweirALL: 	ALLDEP
113cdf0e10cSrcweir.ENDIF
114cdf0e10cSrcweir
115cdf0e10cSrcweir.INCLUDE :  target.mk
116cdf0e10cSrcweir
117cdf0e10cSrcweirCPPUMAKERFLAGS =
118cdf0e10cSrcweir.IF "$(COM)" == "MSC"
119cdf0e10cSrcweirCPPUMAKERFLAGS = -L
120cdf0e10cSrcweir.ENDIF
121cdf0e10cSrcweir
122cdf0e10cSrcweirTYPES:=test.A;test.BA;test.CA;test.DBA;test.E;test.FE;test.G;test.H;test.I
123cdf0e10cSrcweirHELPERTYPES:=com.sun.star.uno.XReference;com.sun.star.uno.XAdapter;com.sun.star.uno.XAggregation;com.sun.star.uno.XWeak;com.sun.star.lang.XComponent;com.sun.star.lang.XTypeProvider;com.sun.star.lang.XEventListener;com.sun.star.lang.XSingleServiceFactory;com.sun.star.lang.XMultiServiceFactory;com.sun.star.registry.XRegistryKey;com.sun.star.lang.XInitialization;com.sun.star.lang.XServiceInfo;com.sun.star.loader.XImplementationLoader;com.sun.star.lang.IllegalAccessException;com.sun.star.beans.XVetoableChangeListener;com.sun.star.beans.XPropertySet;com.sun.star.uno.XComponentContext
124cdf0e10cSrcweirFACTORYTYPES:=com.sun.star.lang.XComponent;com.sun.star.registry.XSimpleRegistry;com.sun.star.lang.XInitialization;com.sun.star.lang.XMultiServiceFactory;com.sun.star.loader.XImplementationLoader;com.sun.star.registry.XImplementationRegistration;com.sun.star.container.XSet;com.sun.star.lang.XSingleServiceFactory;com.sun.star.lang.XSingleComponentFactory;com.sun.star.lang.XMultiComponentFactory
125cdf0e10cSrcweir
126cdf0e10cSrcweir.IF "$(OS)" == "WNT" || "$(OS)" == "OS2"
127cdf0e10cSrcweirUNO_PATH := $(SOLARBINDIR)
128cdf0e10cSrcweirUNO_OUT := $(OUT)$/bin
129cdf0e10cSrcweirEXT_SO  := .dll
130cdf0e10cSrcweir.ELSE
131cdf0e10cSrcweirUNO_PATH := $(SOLARLIBDIR)
132cdf0e10cSrcweirUNO_OUT  := $(OUT)$/lib
133cdf0e10cSrcweirEXT_SO   := .so
134cdf0e10cSrcweir.ENDIF
135cdf0e10cSrcweir
136cdf0e10cSrcweir$(UNO_OUT)$/%$(EXT_SO): $(UNO_PATH)$/%$(EXT_SO)
137cdf0e10cSrcweir	$(COPY) $^ $@
138cdf0e10cSrcweir
139cdf0e10cSrcweir$(BIN)$/cpputest.rdb: $(ALLIDLFILES) $(UNO_OUT)$/invocadapt.uno$(EXT_SO) $(UNO_OUT)$/bootstrap.uno$(EXT_SO)
140cdf0e10cSrcweir	idlc -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $(ALLIDLFILES)
141cdf0e10cSrcweir	regmerge $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)}
142cdf0e10cSrcweir	regmerge $@ / $(UNOUCRRDB)
143cdf0e10cSrcweir	regcomp -register -r $@ -c reflection.uno$(DLLPOST)
144cdf0e10cSrcweir	touch $@
145cdf0e10cSrcweir
146cdf0e10cSrcweirunoheader: $(BIN)$/cpputest.rdb
147cdf0e10cSrcweir	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TYPES);$(HELPERTYPES)" $(BIN)$/cpputest.rdb
148cdf0e10cSrcweir	cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(FACTORYTYPES)" $(BIN)$/cpputest.rdb
149cdf0e10cSrcweir
150cdf0e10cSrcweir
151cdf0e10cSrcweir$(BIN)$/testdefaultbootstrapping.pl: testdefaultbootstrapping.pl
152cdf0e10cSrcweir	cp testdefaultbootstrapping.pl $@
153cdf0e10cSrcweir
154cdf0e10cSrcweir$(BIN)$/testrc: makefile.mk
155cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
156cdf0e10cSrcweir	echo [Tests] > $@
157cdf0e10cSrcweir	echo TestKey1=com.sun.star.uno.NamingService.rdb >> $@
158cdf0e10cSrcweir.ELSE
159cdf0e10cSrcweir	echo '[Tests]' > $@
160cdf0e10cSrcweir	echo 'TestKey1=file:///'$(PWD)/$(BIN)'/com.sun.star.uno.NamingService.rdb' >> $@
161cdf0e10cSrcweir.ENDIF
162cdf0e10cSrcweir
163cdf0e10cSrcweir
164cdf0e10cSrcweir
165