1*cdf0e10cSrcweir#************************************************************************* 2*cdf0e10cSrcweir# 3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir# 5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir# 7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir# 9*cdf0e10cSrcweir# This file is part of OpenOffice.org. 10*cdf0e10cSrcweir# 11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir# 15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir# 21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir# 26*cdf0e10cSrcweir#************************************************************************* 27*cdf0e10cSrcweirPRJ=.. 28*cdf0e10cSrcweir 29*cdf0e10cSrcweirPRJNAME=cppuhelper 30*cdf0e10cSrcweirTARGET=testhelper 31*cdf0e10cSrcweirENABLE_EXCEPTIONS=TRUE 32*cdf0e10cSrcweirUSE_DEFFILE=TRUE 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir# --- Settings ----------------------------------------------------- 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir.INCLUDE : settings.mk 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir# --- Files -------------------------------------------------------- 39*cdf0e10cSrcweir 40*cdf0e10cSrcweirUNOUCRDEP= $(SOLARBINDIR)$/udkapi.rdb 41*cdf0e10cSrcweirUNOUCRRDB= $(SOLARBINDIR)$/udkapi.rdb 42*cdf0e10cSrcweirUNOUCROUT= $(OUT)$/inc$/test 43*cdf0e10cSrcweirINCPRE+= $(OUT)$/inc$/test 44*cdf0e10cSrcweir 45*cdf0e10cSrcweirOBJFILES= \ 46*cdf0e10cSrcweir $(OBJ)$/testhelper.obj \ 47*cdf0e10cSrcweir $(OBJ)$/testpropshlp.obj \ 48*cdf0e10cSrcweir $(OBJ)$/testidlclass.obj \ 49*cdf0e10cSrcweir $(OBJ)$/testproptyphlp.obj \ 50*cdf0e10cSrcweir $(OBJ)$/testimplhelper.obj \ 51*cdf0e10cSrcweir $(OBJ)$/testcontainer.obj 52*cdf0e10cSrcweir 53*cdf0e10cSrcweirAPP1TARGET=$(TARGET) 54*cdf0e10cSrcweirAPP1OBJS=$(OBJFILES) 55*cdf0e10cSrcweir 56*cdf0e10cSrcweirAPP1STDLIBS+= \ 57*cdf0e10cSrcweir $(CPPULIB) \ 58*cdf0e10cSrcweir $(CPPUHELPERLIB) \ 59*cdf0e10cSrcweir $(SALLIB) 60*cdf0e10cSrcweir 61*cdf0e10cSrcweirAPP1DEF= $(MISC)$/$(APP1TARGET).def 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir############################################# 64*cdf0e10cSrcweir 65*cdf0e10cSrcweirAPP2OBJS = $(OBJ)$/testdefaultbootstrapping.obj 66*cdf0e10cSrcweirAPP2STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) 67*cdf0e10cSrcweirAPP2TARGET = testdefaultbootstrapping 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir############################################# 70*cdf0e10cSrcweir 71*cdf0e10cSrcweirSLOFILES= \ 72*cdf0e10cSrcweir $(SLO)$/cfg_test.obj 73*cdf0e10cSrcweirLIB1TARGET=$(SLB)$/cfg_test.lib 74*cdf0e10cSrcweirLIB1OBJFILES=$(SLOFILES) 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir 77*cdf0e10cSrcweirAPP3OBJS = $(OBJ)$/cfg_test.obj 78*cdf0e10cSrcweirAPP3STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) 79*cdf0e10cSrcweirAPP3TARGET = test_cfg 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir############################################# 82*cdf0e10cSrcweir 83*cdf0e10cSrcweirALLIDLFILES:= helpertest.idl 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir# --- Targets ------------------------------------------------------ 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir.IF "$(depend)" == "" 88*cdf0e10cSrcweirALL: $(BIN)$/cpputest.rdb \ 89*cdf0e10cSrcweir unoheader \ 90*cdf0e10cSrcweir $(BIN)$/testrc \ 91*cdf0e10cSrcweir $(BIN)$/testdefaultbootstrapping.pl \ 92*cdf0e10cSrcweir ALLTAR \ 93*cdf0e10cSrcweir $(BIN)$/$(APP2TARGET).bin \ 94*cdf0e10cSrcweir $(BIN)$/$(APP2TARGET).Bin \ 95*cdf0e10cSrcweir $(BIN)$/$(APP2TARGET).Exe 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir.IF "$(GUI)"=="UNX" 98*cdf0e10cSrcweirALL: $(BIN)$/$(APP2TARGET).exe 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).exe : $(APP2TARGETN) 101*cdf0e10cSrcweir cp $(APP2TARGETN) $@ 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir.ENDIF 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).bin : $(APP2TARGETN) 107*cdf0e10cSrcweir cp $(APP2TARGETN) $@ 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).Bin : $(APP2TARGETN) 110*cdf0e10cSrcweir cp $(APP2TARGETN) $@ 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir$(BIN)$/$(APP2TARGET).Exe : $(APP2TARGETN) 113*cdf0e10cSrcweir cp $(APP2TARGETN) $@ 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir.ELSE 116*cdf0e10cSrcweirALL: ALLDEP 117*cdf0e10cSrcweir.ENDIF 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir.INCLUDE : target.mk 120*cdf0e10cSrcweir 121*cdf0e10cSrcweirCPPUMAKERFLAGS = 122*cdf0e10cSrcweir.IF "$(COM)" == "MSC" 123*cdf0e10cSrcweirCPPUMAKERFLAGS = -L 124*cdf0e10cSrcweir.ENDIF 125*cdf0e10cSrcweir 126*cdf0e10cSrcweirTYPES:=test.A;test.BA;test.CA;test.DBA;test.E;test.FE;test.G;test.H;test.I 127*cdf0e10cSrcweirHELPERTYPES:=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 128*cdf0e10cSrcweirFACTORYTYPES:=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 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir.IF "$(OS)" == "WNT" || "$(OS)" == "OS2" 131*cdf0e10cSrcweirUNO_PATH := $(SOLARBINDIR) 132*cdf0e10cSrcweirUNO_OUT := $(OUT)$/bin 133*cdf0e10cSrcweirEXT_SO := .dll 134*cdf0e10cSrcweir.ELSE 135*cdf0e10cSrcweirUNO_PATH := $(SOLARLIBDIR) 136*cdf0e10cSrcweirUNO_OUT := $(OUT)$/lib 137*cdf0e10cSrcweirEXT_SO := .so 138*cdf0e10cSrcweir.ENDIF 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir$(UNO_OUT)$/%$(EXT_SO): $(UNO_PATH)$/%$(EXT_SO) 141*cdf0e10cSrcweir $(COPY) $^ $@ 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir$(BIN)$/cpputest.rdb: $(ALLIDLFILES) $(UNO_OUT)$/invocadapt.uno$(EXT_SO) $(UNO_OUT)$/bootstrap.uno$(EXT_SO) 144*cdf0e10cSrcweir idlc -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $(ALLIDLFILES) 145*cdf0e10cSrcweir regmerge $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)} 146*cdf0e10cSrcweir regmerge $@ / $(UNOUCRRDB) 147*cdf0e10cSrcweir regcomp -register -r $@ -c reflection.uno$(DLLPOST) 148*cdf0e10cSrcweir touch $@ 149*cdf0e10cSrcweir 150*cdf0e10cSrcweirunoheader: $(BIN)$/cpputest.rdb 151*cdf0e10cSrcweir cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TYPES);$(HELPERTYPES)" $(BIN)$/cpputest.rdb 152*cdf0e10cSrcweir cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(FACTORYTYPES)" $(BIN)$/cpputest.rdb 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir$(BIN)$/testdefaultbootstrapping.pl: testdefaultbootstrapping.pl 156*cdf0e10cSrcweir cp testdefaultbootstrapping.pl $@ 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir$(BIN)$/testrc: makefile.mk 159*cdf0e10cSrcweir.IF "$(GUI)"=="WNT" 160*cdf0e10cSrcweir echo [Tests] > $@ 161*cdf0e10cSrcweir echo TestKey1=com.sun.star.uno.NamingService.rdb >> $@ 162*cdf0e10cSrcweir.ELSE 163*cdf0e10cSrcweir echo '[Tests]' > $@ 164*cdf0e10cSrcweir echo 'TestKey1=file:///'$(PWD)/$(BIN)'/com.sun.star.uno.NamingService.rdb' >> $@ 165*cdf0e10cSrcweir.ENDIF 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir 169