# Build libxds and support/test programs. CC = gcc CXX = g++ AR = ar RANLIB = ranlib WARNFLAGS = -Wall -ansi -pedantic OPTFLAGS = -O3 -pipe CPPFLAGS = CFLAGS = CXXFLAGS = LDFLAGS = OBJS = decode.o destroy.o encode.o getbuffer.o init.o register.o \ setbuffer.o unregister.o vdecode.o vencode.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 test.o test rm -f xds.3 check: libxds.a (cd regression-tests && $(MAKE) check) # Dependencies test.o: test.c xds.h