xref: /AOO41X/main/sdext/source/pdfimport/test/makefile.mk (revision 752c0af7a363384187ac405b16fce81a66637031)
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
23
24PRJ=..$/..$/..
25PRJNAME=sdext
26TARGET=tests
27TARGETTYPE=CUI
28ENABLE_EXCEPTIONS=TRUE
29
30# --- Settings -----------------------------------------------------
31
32.INCLUDE: settings.mk
33
34# --- test lib ------------------------------------------------------
35
36.IF "$(ENABLE_PDFIMPORT)" == "NO"
37@all:
38        @echo "PDF Import extension disabled."
39.ENDIF
40
41CFLAGSCXX += $(CPPUNIT_CFLAGS)
42
43.IF "$(SYSTEM_ZLIB)" == "YES"
44CFLAGS+=-DSYSTEM_ZLIB
45.ENDIF
46
47SHL1OBJS=  \
48    $(SLO)$/tests.obj
49
50SHL1LIBS=\
51    $(SLB)$/pdfmisc.lib \
52    $(SLB)$/pdfparse.lib \
53    $(SLB)$/pdfsax.lib \
54    $(SLB)$/pdfparsetree.lib \
55    $(SLB)$/pdfodf.lib \
56    $(SLB)$/xpdfwrapper.lib \
57    $(SLB)$/pdfimport.lib
58
59SHL1TARGET=$(TARGET)
60SHL1STDLIBS=\
61    $(BASEGFXLIB)       \
62    $(UNOTOOLSLIB)      \
63    $(CANVASTOOLSLIB)   \
64    $(COMPHELPERLIB)    \
65    $(CPPUHELPERLIB)    \
66    $(CPPUNITLIB)       \
67        $(TESTSHL2LIB)           \
68    $(ZLIB3RDLIB)       \
69    $(CPPULIB)          \
70    $(SALLIB)
71
72
73SHL1IMPLIB= i$(SHL1TARGET)
74DEF1NAME    =$(SHL1TARGET)
75SHL1VERSIONMAP = export.map
76
77# --- pdf2xml binary ------------------------------------------------------
78
79TARGET2=pdf2xml
80
81APP1TARGET=$(TARGET2)
82APP1LIBSALCPPRT=
83APP1OBJS=$(SLO)$/pdf2xml.obj
84
85APP1LIBS=\
86    $(SLB)$/pdfmisc.lib \
87    $(SLB)$/pdfparse.lib \
88    $(SLB)$/pdfsax.lib \
89    $(SLB)$/pdfparsetree.lib \
90    $(SLB)$/pdfodf.lib \
91    $(SLB)$/xpdfwrapper.lib \
92    $(SLB)$/pdfimport.lib
93
94APP1STDLIBS=\
95    $(BASEGFXLIB)       \
96    $(UNOTOOLSLIB)      \
97    $(CANVASTOOLSLIB)   \
98    $(COMPHELPERLIB)    \
99    $(CPPUHELPERLIB)    \
100    $(CPPUNITLIB)       \
101        $(TESTSHL2LIB)           \
102    $(ZLIB3RDLIB)       \
103    $(CPPULIB)          \
104    $(SALLIB)
105
106# --- pdfunzip binary ------------------------------------------------------
107
108TARGET3=pdfunzip
109
110APP2TARGET=$(TARGET3)
111APP2LIBSALCPPRT=
112APP2OBJS=$(SLO)$/pdfunzip.obj
113
114APP2LIBS=\
115    $(SLB)$/pdfmisc.lib \
116    $(SLB)$/pdfparse.lib \
117    $(SLB)$/pdfsax.lib \
118    $(SLB)$/pdfparsetree.lib \
119    $(SLB)$/pdfodf.lib \
120    $(SLB)$/xpdfwrapper.lib \
121    $(SLB)$/pdfimport.lib
122
123APP2STDLIBS=\
124    $(BASEGFXLIB)       \
125    $(UNOTOOLSLIB)      \
126    $(CANVASTOOLSLIB)   \
127    $(COMPHELPERLIB)    \
128    $(CPPUHELPERLIB)    \
129    $(CPPUNITLIB)       \
130        $(TESTSHL2LIB)           \
131    $(ZLIB3RDLIB)       \
132    $(CPPULIB)          \
133    $(SALLIB)
134
135# --- Targets ------------------------------------------------------
136
137  .INCLUDE : target.mk
138  .INCLUDE : _cppunit.mk
139
140# --- Fake uno bootstrap & copy testfile ------------------------
141
142  $(BIN)$/pdfi_unittest_test.pdf : testinput.pdf
143    rm -f $@
144    $(GNUCOPY) testinput.pdf $@
145
146  $(BIN)$/pdfi_unittest_test.ini : makefile.mk
147    rm -f $@
148    @echo UNO_SERVICES= > $@
149    @echo UNO_TYPES=$(UNOUCRRDB:s/\/\\/) >> $@
150
151# --- Enable testshl2 execution in normal build ------------------------
152
153  $(MISC)$/pdfi_unittest_succeeded : $(SHL1TARGETN) $(BIN)$/pdfi_unittest_test.pdf $(BIN)$/pdfi_unittest_test.ini
154        rm -f $(BIN)$/pdfi_unittest_draw.xml
155        rm -f $(BIN)$/pdfi_unittest_writer.xml
156        @echo ----------------------------------------------------------
157        @echo - start unit test on library $(SHL1TARGETN)
158        @echo ----------------------------------------------------------
159        testshl2 -forward $(BIN)$/ $(SHL1TARGETN)
160        $(TOUCH) $@
161
162#ALLTAR : $(MISC)$/pdfi_unittest_succeeded
163