include ../settings.make

# Babel generates this babel.make file to define
# macros for all the files that are generated
include babel.make
IMPLOBJS=${IMPLSRCS:.cc=.lo}
SKELOBJS=${SKELSRCS:.cc=.lo}
IOROBJS=${IORSRCS:.c=.lo}
STUBOBJS=${STUBSRCS:.cc=.lo}
ALLOBJS=${IMPLOBJS} ${SKELOBJS} ${IOROBJS} ${STUBOBJS}

all: libcxxconway.la

# make doesn't handle tasks that generate lots of files
# this handy idiom creates touches a bogus file if babel
# executes without errors
babel-stamp: ../life.sidl
	${BABEL} --server=C++  ../life.sidl cxxlife.sidl && \
	touch babel-stamp
	$(MAKE) all

libcxxconway.la: babel-stamp  ${ALLOBJS}
	${BABEL_LIBTOOL} --mode=link ${CXX} -module -no-undefined -o libcxxconway.la -rpath `pwd`/.libs -release 2.0 ${ALLOBJS} ${CXXLIBS} -L${BABEL_LIBDIR} -lsidl

clean:
	$(RM) babel-stamp ${ALLOBJS} *.so *~ *.lo *.o *.la
	$(RM) -rf .libs

new:	clean
	$(RM) ${SKELSRCS} ${IORSRCS} ${STUBSRCS} ${SKELHDRS} ${IORHDRS} ${STUBHDRS} 

