update dev300-m58
[ooovba.git] / cppuhelper / test / makefile.mk
blob7d88f2f64e8702d2967d69e6648848541b6e00c5
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.25 $
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 #*************************************************************************
31 PRJ=..
33 PRJNAME=cppuhelper
34 TARGET=testhelper
35 ENABLE_EXCEPTIONS=TRUE
36 USE_DEFFILE=TRUE
38 # --- Settings -----------------------------------------------------
40 .INCLUDE : settings.mk
42 # --- Files --------------------------------------------------------
44 UNOUCRDEP= $(SOLARBINDIR)$/udkapi.rdb
45 UNOUCRRDB= $(SOLARBINDIR)$/udkapi.rdb
46 UNOUCROUT= $(OUT)$/inc$/test
47 INCPRE+= $(OUT)$/inc$/test
49 OBJFILES= \
50 $(OBJ)$/testhelper.obj \
51 $(OBJ)$/testpropshlp.obj \
52 $(OBJ)$/testidlclass.obj \
53 $(OBJ)$/testproptyphlp.obj \
54 $(OBJ)$/testimplhelper.obj \
55 $(OBJ)$/testcontainer.obj
57 APP1TARGET=$(TARGET)
58 APP1OBJS=$(OBJFILES)
60 APP1STDLIBS+= \
61 $(CPPULIB) \
62 $(CPPUHELPERLIB) \
63 $(SALLIB)
65 APP1DEF= $(MISC)$/$(APP1TARGET).def
67 #############################################
69 APP2OBJS = $(OBJ)$/testdefaultbootstrapping.obj
70 APP2STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
71 APP2TARGET = testdefaultbootstrapping
73 #############################################
75 SLOFILES= \
76 $(SLO)$/cfg_test.obj
77 LIB1TARGET=$(SLB)$/cfg_test.lib
78 LIB1OBJFILES=$(SLOFILES)
81 APP3OBJS = $(OBJ)$/cfg_test.obj
82 APP3STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
83 APP3TARGET = test_cfg
85 #############################################
87 ALLIDLFILES:= helpertest.idl
89 # --- Targets ------------------------------------------------------
91 .IF "$(depend)" == ""
92 ALL: $(BIN)$/cpputest.rdb \
93 unoheader \
94 $(BIN)$/testrc \
95 $(BIN)$/testdefaultbootstrapping.pl \
96 ALLTAR \
97 $(BIN)$/$(APP2TARGET).bin \
98 $(BIN)$/$(APP2TARGET).Bin \
99 $(BIN)$/$(APP2TARGET).Exe
101 .IF "$(GUI)"=="UNX"
102 ALL: $(BIN)$/$(APP2TARGET).exe
104 $(BIN)$/$(APP2TARGET).exe : $(APP2TARGETN)
105 cp $(APP2TARGETN) $@
107 .ENDIF
110 $(BIN)$/$(APP2TARGET).bin : $(APP2TARGETN)
111 cp $(APP2TARGETN) $@
113 $(BIN)$/$(APP2TARGET).Bin : $(APP2TARGETN)
114 cp $(APP2TARGETN) $@
116 $(BIN)$/$(APP2TARGET).Exe : $(APP2TARGETN)
117 cp $(APP2TARGETN) $@
119 .ELSE
120 ALL: ALLDEP
121 .ENDIF
123 .INCLUDE : target.mk
125 CPPUMAKERFLAGS =
126 .IF "$(COM)" == "MSC"
127 CPPUMAKERFLAGS = -L
128 .ENDIF
130 TYPES:=test.A;test.BA;test.CA;test.DBA;test.E;test.FE;test.G;test.H;test.I
131 HELPERTYPES:=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
132 FACTORYTYPES:=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
134 .IF "$(OS)" == "WNT" || "$(OS)" == "OS2"
135 UNO_PATH := $(SOLARBINDIR)
136 UNO_OUT := $(OUT)$/bin
137 EXT_SO := .dll
138 .ELSE
139 UNO_PATH := $(SOLARLIBDIR)
140 UNO_OUT := $(OUT)$/lib
141 EXT_SO := .so
142 .ENDIF
144 $(UNO_OUT)$/%$(EXT_SO): $(UNO_PATH)$/%$(EXT_SO)
145 $(COPY) $^ $@
147 $(BIN)$/cpputest.rdb: $(ALLIDLFILES) $(UNO_OUT)$/invocadapt.uno$(EXT_SO) $(UNO_OUT)$/bootstrap.uno$(EXT_SO)
148 idlc -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $(ALLIDLFILES)
149 regmerge $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)}
150 regmerge $@ / $(UNOUCRRDB)
151 regcomp -register -r $@ -c reflection.uno$(DLLPOST)
152 touch $@
154 unoheader: $(BIN)$/cpputest.rdb
155 cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TYPES);$(HELPERTYPES)" $(BIN)$/cpputest.rdb
156 cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(FACTORYTYPES)" $(BIN)$/cpputest.rdb
159 $(BIN)$/testdefaultbootstrapping.pl: testdefaultbootstrapping.pl
160 cp testdefaultbootstrapping.pl $@
162 $(BIN)$/testrc: makefile.mk
163 .IF "$(GUI)"=="WNT"
164 echo [Tests] > $@
165 echo TestKey1=com.sun.star.uno.NamingService.rdb >> $@
166 .ELSE
167 echo '[Tests]' > $@
168 echo 'TestKey1=file:///'$(PWD)/$(BIN)'/com.sun.star.uno.NamingService.rdb' >> $@
169 .ENDIF