# Build libxds and support/test programs. CC = gcc CXX = g++ AR = ar RANLIB = ranlib WARNFLAGS = -Wall -ansi -pedantic OPTFLAGS = -O3 -pipe CPPFLAGS = -D_GNU_SOURCE CFLAGS = CXXFLAGS = LDFLAGS = OBJS = decode.o destroy.o encode.o getbuffer.o init.o register.o \ setbuffer.o unregister.o vdecode.o vencode.o find-engine.o .c.o: $(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) -c $< .cpp.o: $(CXX) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CXXFLAGS) -c $< all: libxds.a xds.3 test libxds.a: $(OBJS) @rm -f $@ $(AR) cr $@ $(OBJS) $(RANLIB) $@ test: test.o libxds.a $(CC) $(LDFLAGS) -o $@ test.o -L. -lxds xds.3: xds.pod pod2man --section=3 --center="XDS Library Programmer API " xds.pod >xds.3 clean:: @(cd regression-tests && $(MAKE) clean) rm -f $(OBJS) rm -f libxds.a test.o test xds.3 check: libxds.a (cd regression-tests && $(MAKE) check) # Dependencies decode.o: internal.h xds.h destroy.o: internal.h xds.h encode.o: internal.h xds.h getbuffer.o: internal.h xds.h init.o: internal.h xds.h register.o: internal.h xds.h setbuffer.o: internal.h xds.h test.o: xds.h unregister.o: internal.h xds.h vdecode.o: internal.h xds.h vencode.o: internal.h xds.h