Branch libreoffice-5-0-4
[LibreOffice.git] / cppuhelper / test / makefile.mk
blob7ff031004eb772135620a4a0fe2ef502a5fda6a9
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 PRJ=..
20 PRJNAME=cppuhelper
21 TARGET=testhelper
22 ENABLE_EXCEPTIONS=TRUE
23 USE_DEFFILE=TRUE
25 # --- Settings -----------------------------------------------------
27 .INCLUDE : settings.mk
29 # --- Files --------------------------------------------------------
31 UNOUCRDEP= $(SOLARBINDIR)$/udkapi.rdb
32 UNOUCRRDB= $(SOLARBINDIR)$/udkapi.rdb
33 UNOUCROUT= $(OUT)$/inc$/test
34 INCPRE+= $(OUT)$/inc$/test
36 OBJFILES= \
37 $(OBJ)$/testhelper.obj \
38 $(OBJ)$/testpropshlp.obj \
39 $(OBJ)$/testidlclass.obj \
40 $(OBJ)$/testproptyphlp.obj \
41 $(OBJ)$/testimplhelper.obj \
42 $(OBJ)$/testcontainer.obj
44 APP1TARGET=$(TARGET)
45 APP1OBJS=$(OBJFILES)
47 APP1STDLIBS+= \
48 $(CPPULIB) \
49 $(CPPUHELPERLIB) \
50 $(SALLIB)
52 APP1DEF= $(MISC)$/$(APP1TARGET).def
54 #############################################
56 APP2OBJS = $(OBJ)$/testdefaultbootstrapping.obj
57 APP2STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
58 APP2TARGET = testdefaultbootstrapping
60 #############################################
62 SLOFILES= \
63 $(SLO)$/cfg_test.obj
64 LIB1TARGET=$(SLB)$/cfg_test.lib
65 LIB1OBJFILES=$(SLOFILES)
68 APP3OBJS = $(OBJ)$/cfg_test.obj
69 APP3STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
70 APP3TARGET = test_cfg
72 #############################################
74 ALLIDLFILES:= helpertest.idl
76 # --- Targets ------------------------------------------------------
78 .IF "$(depend)" == ""
79 ALL: $(BIN)$/cpputest.rdb \
80 unoheader \
81 $(BIN)$/testrc \
82 $(BIN)$/testdefaultbootstrapping.pl \
83 ALLTAR \
84 $(BIN)$/$(APP2TARGET).bin \
85 $(BIN)$/$(APP2TARGET).Bin \
86 $(BIN)$/$(APP2TARGET).Exe
88 .IF "$(OS)"!="WNT"
89 ALL: $(BIN)$/$(APP2TARGET).exe
91 $(BIN)$/$(APP2TARGET).exe : $(APP2TARGETN)
92 cp $(APP2TARGETN) $@
94 .ENDIF
97 $(BIN)$/$(APP2TARGET).bin : $(APP2TARGETN)
98 cp $(APP2TARGETN) $@
100 $(BIN)$/$(APP2TARGET).Bin : $(APP2TARGETN)
101 cp $(APP2TARGETN) $@
103 $(BIN)$/$(APP2TARGET).Exe : $(APP2TARGETN)
104 cp $(APP2TARGETN) $@
106 .ELSE
107 ALL: ALLDEP
108 .ENDIF
110 .INCLUDE : target.mk
112 CPPUMAKERFLAGS =
113 .IF "$(COM)" == "MSC"
114 CPPUMAKERFLAGS = -L
115 .ENDIF
117 TYPES:=test.A;test.BA;test.CA;test.DBA;test.E;test.FE;test.G;test.H;test.I
118 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
119 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
121 .IF "$(OS)" == "WNT"
122 UNO_PATH := $(SOLARBINDIR)
123 UNO_OUT := $(OUT)$/bin
124 EXT_SO := .dll
125 .ELSE
126 UNO_PATH := $(SOLARLIBDIR)
127 UNO_OUT := $(OUT)$/lib
128 EXT_SO := .so
129 .ENDIF
131 $(UNO_OUT)$/%$(EXT_SO): $(UNO_PATH)$/%$(EXT_SO)
132 $(COPY) $^ $@
134 $(BIN)$/cpputest.rdb: $(ALLIDLFILES) $(UNO_OUT)$/invocadapt.uno$(EXT_SO) $(UNO_OUT)$/bootstrap.uno$(EXT_SO)
135 $(IDLC) -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $(ALLIDLFILES)
136 $(REGMERGE) $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)}
137 $(REGMERGE) $@ / $(UNOUCRRDB)
138 $(REGCOMP) -register -r $@ -c reflection.uno$(DLLPOST)
139 $(TOUCH) $@
141 unoheader: $(BIN)$/cpputest.rdb
142 $(CPPUMAKER) $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(TYPES);$(HELPERTYPES)" $(BIN)$/cpputest.rdb
143 $(CPPUMAKER) $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) -T"$(FACTORYTYPES)" $(BIN)$/cpputest.rdb
146 $(BIN)$/testdefaultbootstrapping.pl: testdefaultbootstrapping.pl
147 cp testdefaultbootstrapping.pl $@
149 $(BIN)$/testrc: makefile.mk
150 .IF "$(OS)"=="WNT"
151 echo [Tests] > $@
152 echo TestKey1=com.sun.star.uno.NamingService.rdb >> $@
153 .ELSE
154 echo '[Tests]' > $@
155 echo 'TestKey1=file:///'$(PWD)/$(BIN)'/com.sun.star.uno.NamingService.rdb' >> $@
156 .ENDIF