include ../settings.make

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

all: libcconway.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 clife.sidl && \
	touch babel-stamp
	${MAKE} all

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

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

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

