1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ=..$/..$/..
29PRJNAME=sdext
30TARGET=tests
31TARGETTYPE=CUI
32ENABLE_EXCEPTIONS=TRUE
33
34# --- Settings -----------------------------------------------------
35
36.INCLUDE: settings.mk
37
38# --- test lib ------------------------------------------------------
39
40.IF "$(ENABLE_PDFIMPORT)" == "NO"
41@all:
42        @echo "PDF Import extension disabled."
43.ENDIF
44
45CFLAGSCXX += $(CPPUNIT_CFLAGS)
46
47.IF "$(SYSTEM_ZLIB)" == "YES"
48CFLAGS+=-DSYSTEM_ZLIB
49.ENDIF
50
51SHL1OBJS=  \
52	$(SLO)$/tests.obj
53
54SHL1LIBS=\
55	$(SLB)$/pdfmisc.lib \
56	$(SLB)$/pdfparse.lib \
57	$(SLB)$/pdfsax.lib \
58	$(SLB)$/pdfparsetree.lib \
59	$(SLB)$/pdfodf.lib \
60	$(SLB)$/xpdfwrapper.lib \
61	$(SLB)$/pdfimport.lib
62
63SHL1TARGET=$(TARGET)
64SHL1STDLIBS=\
65	$(BASEGFXLIB)		\
66	$(UNOTOOLSLIB)		\
67	$(CANVASTOOLSLIB)	\
68	$(COMPHELPERLIB)	\
69	$(CPPUHELPERLIB)	\
70	$(CPPUNITLIB)		\
71        $(TESTSHL2LIB)           \
72	$(ZLIB3RDLIB)	    \
73	$(CPPULIB)			\
74	$(SALLIB)
75
76
77SHL1IMPLIB= i$(SHL1TARGET)
78DEF1NAME    =$(SHL1TARGET)
79SHL1VERSIONMAP = export.map
80
81# --- pdf2xml binary ------------------------------------------------------
82
83TARGET2=pdf2xml
84
85APP1TARGET=$(TARGET2)
86APP1LIBSALCPPRT=
87APP1OBJS=$(SLO)$/pdf2xml.obj
88
89APP1LIBS=\
90	$(SLB)$/pdfmisc.lib \
91	$(SLB)$/pdfparse.lib \
92	$(SLB)$/pdfsax.lib \
93	$(SLB)$/pdfparsetree.lib \
94	$(SLB)$/pdfodf.lib \
95	$(SLB)$/xpdfwrapper.lib \
96	$(SLB)$/pdfimport.lib
97
98APP1STDLIBS=\
99	$(BASEGFXLIB)		\
100	$(UNOTOOLSLIB)		\
101	$(CANVASTOOLSLIB)	\
102	$(COMPHELPERLIB)	\
103	$(CPPUHELPERLIB)	\
104	$(CPPUNITLIB)		\
105        $(TESTSHL2LIB)           \
106	$(ZLIB3RDLIB)	    \
107	$(CPPULIB)			\
108	$(SALLIB)
109
110# --- pdfunzip binary ------------------------------------------------------
111
112TARGET3=pdfunzip
113
114APP2TARGET=$(TARGET3)
115APP2LIBSALCPPRT=
116APP2OBJS=$(SLO)$/pdfunzip.obj
117
118APP2LIBS=\
119	$(SLB)$/pdfmisc.lib \
120	$(SLB)$/pdfparse.lib \
121	$(SLB)$/pdfsax.lib \
122	$(SLB)$/pdfparsetree.lib \
123	$(SLB)$/pdfodf.lib \
124	$(SLB)$/xpdfwrapper.lib \
125	$(SLB)$/pdfimport.lib
126
127APP2STDLIBS=\
128	$(BASEGFXLIB)		\
129  	$(UNOTOOLSLIB)		\
130  	$(CANVASTOOLSLIB)	\
131  	$(COMPHELPERLIB)	\
132  	$(CPPUHELPERLIB)	\
133  	$(CPPUNITLIB)		\
134        $(TESTSHL2LIB)           \
135  	$(ZLIB3RDLIB)	    \
136  	$(CPPULIB)			\
137  	$(SALLIB)
138
139# --- Targets ------------------------------------------------------
140
141  .INCLUDE : target.mk
142  .INCLUDE : _cppunit.mk
143
144# --- Fake uno bootstrap & copy testfile ------------------------
145
146  $(BIN)$/pdfi_unittest_test.pdf : testinput.pdf
147  	rm -f $@
148  	$(GNUCOPY) testinput.pdf $@
149
150  $(BIN)$/pdfi_unittest_test.ini : makefile.mk
151  	rm -f $@
152  	@echo UNO_SERVICES= > $@
153  	@echo UNO_TYPES=$(UNOUCRRDB:s/\/\\/) >> $@
154
155# --- Enable testshl2 execution in normal build ------------------------
156
157  $(MISC)$/pdfi_unittest_succeeded : $(SHL1TARGETN) $(BIN)$/pdfi_unittest_test.pdf $(BIN)$/pdfi_unittest_test.ini
158  		rm -f $(BIN)$/pdfi_unittest_draw.xml
159  		rm -f $(BIN)$/pdfi_unittest_writer.xml
160  		@echo ----------------------------------------------------------
161  		@echo - start unit test on library $(SHL1TARGETN)
162  		@echo ----------------------------------------------------------
163  		testshl2 -forward $(BIN)$/ $(SHL1TARGETN)
164   		$(TOUCH) $@
165
166#ALLTAR : $(MISC)$/pdfi_unittest_succeeded
167