PREFIX=@prefix@
BUILD_SHARED=FALSE
RANLIB=@RANLIB@

MODULES=unicode input_sources sax dom
MAJOR=0
MINOR=8

CP=cp -p
MKDIR=mkdir -p
CHMOD=chmod

all: ${MODULES}
install: install_dirs all
	cd ${PREFIX}/include/xmlada; ${CHMOD} -w *.ali

install_dirs: force
	${MKDIR} ${PREFIX}/lib
	${MKDIR} ${PREFIX}/include/xmlada
	${MKDIR} ${PREFIX}/bin
	${CP} xmlada-config ${PREFIX}/bin
	${CHMOD} +x ${PREFIX}/bin/xmlada-config

${MODULES}: force
	cd $@; ${MAKE} -f ../Makefile.module.314 
	cd $@; ${MAKE} -f ../Makefile.module.314 MAJOR=${MAJOR} MINOR=${MINOR} PREFIX="${PREFIX}" BUILD_SHARED=${BUILD_SHARED} RANLIB="${RANLIB}" MODULE=$@ lib

clean: force
	${RM} ${MODULES:%=%/obj/*} 2>/dev/null

force:
