ossp-pkg/xds/Makefile.in
1.23
# Build libxds.
CC = @CC@
AR = ar
RANLIB = @RANLIB@
CPPFLAGS = @CPPFLAGS@ @DEFS@ -D_GNU_SOURCE
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
POD2MAN = @POD2MAN@
LIB_NAME = libxds.a
LIB_OBJS = xds.o xds_engine_xdr.o xds_engine_xml.o
TST_SRCS = xds_test_lib.c xds_test_xdr.c xds_test_xml.c
.SUFFIXES:
.SUFFIXES: .c .o .pod .3
.PHONY: clean distclean realclean check docs
.c.o:
$(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) -c $<
.pod.3:
$(POD2MAN) --section=3 --center="XDS Library Programmer API" $< >$@
all: $(LIB_NAME) xds.3
$(LIB_NAME): $(LIB_OBJS)
@rm -f $@
$(AR) cr $@ $(LIB_OBJS)
$(RANLIB) $@
clean::
@(cd docs && $(MAKE) $@)
-rm -f $(LIB_OBJS)
-rm -f ./.*.t ./.*.l
-rm -f $(LIB_NAME)
-rm -f xds.3
distclean:: clean
@(cd docs && $(MAKE) $@)
-rm -f config.log config.status Makefile
realclean:: distclean
-rm -f configure
check: $(LIB_NAME) $(TST_SRCS)
-@for filename in $(TST_SRCS); do \
for testname in `grep "#ifdef XDS_TEST_" $$filename | sed -e 's;^#ifdef ;;'`; do \
filebase=`echo $$filename | sed -e 's;\.c;;'`; \
testbase=`echo $$testname | sed -e 's;^XDS_TEST_;;'`; \
if [ ! -f ".$$testbase.t" ]; then \
echo "$(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -D$$testname -o .$$testbase.t $$filebase.c $(LIB_NAME)"; \
$(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -D$$testname -o .$$testbase.t $$filebase.c $(LIB_NAME); \
fi; \
done; \
done; \
sh ./xds_test.sh ./.*.t
docs:
@(cd docs && $(MAKE))
# Dependencies
$(LIB_OBJS): xds_p.h xds.h