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