#! gmake

## AbiSource Program Utilities, libwv wrapper
## Copyright (C) 1998 AbiSource, Inc.
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
## 
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
## 02111-1307, USA.

ABI_ROOT:=$(shell pwd)/../abi
ABI_PEER:=/wv

include $(ABI_ROOT)/src/config/abi_defs.mk

CSRCS= \
	twips.c \
	escher.c \
	symbol.c \
	support.c \
	list.c \
	piecetable.c \
	stylesheet.c \
	sprm.c \
	blip.c \
	utf.c \
	field.c \
	references.c \
	gpprl.c \
	papchpsep.c \
	hyperlink.c \
	decompresswmf.c \
	annotations.c \
	dop.c \
	roman.c \
	fib.c \
	fdoa.c \
	fopt.c \
	frd.c \
	atrd.c \
	sed.c \
	font.c \
	ffn.c \
	fld.c \
	bkf.c \
	dttm.c \
	generic.c \
	error.c \
	unicode.c \
	sttbf.c \
	xst.c \
	fspa.c \
	fbse.c \
	lst.c \
	lvl.c \
	lfo.c \
	nfc.c \
	ordinal.c \
	summary.c \
	filetime.c \
	chp.c \
	brc.c \
	anld.c \
	shd.c \
	dcs.c \
	numrm.c \
	asumyi.c \
	version.c \
	lspd.c \
	phe.c \
	tlp.c \
	tc.c \
	tap.c \
	pap.c \
	bintree.c \
	decode_simple.c \
	pcd.c \
	prm.c \
	clx.c \
	bte.c \
	bx.c \
	fkp.c \
	text.c \
	decode_complex.c \
	wvTextEngine.c \
	wvHtmlEngine.c \
	wvConfig.c \
	wvparse.c \
	reasons.c \
	sep.c \
	anlv.c \
	olst.c \
	asumy.c \
	bkd.c \
	bkl.c \
	dogrid.c \
	doptypography.c \
	pgd.c \
	rs.c \
	rr.c \
	tbd.c \
	ftxbxs.c \
	wkb.c \
	graphics.c \
	picf.c \
	crc32.c \
	md5.c \
	rc4.c \
	decrypt97.c \
	decrypt95.c \
	table.c \
	iconv/codepage-874.c \
	iconv/codepage-1250.c \
	iconv/codepage-1251.c \
	iconv/codepage-1254.c \
	iconv/codepage-1257.c \
	iconv/codepage-1252.c \
	iconv/codepage-1255.c \
	iconv/codepage-1253.c \
	iconv/codepage-1256.c \
	iconv/koi8-r.c \
	iconv/iso-8859-15.c \
	iconv/tis-620.c \
	iconv/utf-8.c \
	iconv/iconv.c \
	exporter/anld.c \
	exporter/anlv.c \
	exporter/asumy.c \
	exporter/asumyi.c \
	exporter/atrd.c \
	exporter/bkd.c \
	exporter/bkf.c \
	exporter/bkl.c \
	exporter/brc.c \
	exporter/bte.c \
	exporter/bx.c \
	exporter/chp.c \
	exporter/dcs.c \
	exporter/dogrid.c \
	exporter/dop.c \
	exporter/doptypography.c \
	exporter/dttm.c \
	exporter/fbse.c \
	exporter/fdoa.c \
	exporter/ffn.c \
	exporter/fib.c \
	exporter/filetime.c \
	exporter/fld.c \
	exporter/font.c \
	exporter/fopt.c \
	exporter/frd.c \
	exporter/fspa.c \
	exporter/ftxbxs.c \
	exporter/generic.c \
	exporter/lfo.c \
	exporter/lspd.c \
	exporter/lst.c \
	exporter/lvl.c \
	exporter/numrm.c \
	exporter/olst.c \
	exporter/pcd.c \
	exporter/pgd.c \
	exporter/phe.c \
	exporter/prm.c \
	exporter/rr.c \
	exporter/rs.c \
	exporter/sed.c \
	exporter/sep.c \
	exporter/shd.c \
	exporter/stylesheet.c \
	exporter/summary.c \
	exporter/support.c \
	exporter/tbd.c \
	exporter/tc.c \
	exporter/tlp.c \
	exporter/wkb.c

CFLAGS+=		-I. -I./exporter/ -I./iconv -DCONFIGFILE=\".mswordview\" -DTTFDIR=\"\" -DSYMBOLFONTDIR=\"\" -DPATTERNDIR=\"\" -DWINGDINGFONTDIR=\"\"


CSRCS+= \
	oledecod/oledecod.c \
	laolareplace.c \
	libole2/ms-ole.c

CFLAGS+= \
	-I./oledecod \
	-I./libole2
	
	
ifdef GLIB_CONFIG

else

CSRCS+= \
	glib-wv/garray.c \
	glib-wv/glist.c \
	glib-wv/gmem.c \
	glib-wv/gmessages.c \
	glib-wv/gslist.c \
	glib-wv/gstrfuncs.c \
	glib-wv/gtree.c

CFLAGS+= \
	-I./glib-wv

endif
 



LIBRARY_NAME=		Abi_libwv
LIBRARY_VERSION=	$(ABI_VERSION)
TARGETS=		$(LIBRARY)
LEX=			flex

include $(ABI_ROOT)/src/config/abi_rules.mk

build:: $(TARGETS)

libole2/msole.c:
	CFLAGS+= -I libole2/system-includes/
