1# makefile written for gnu make 2CXX = g++ 3SRC = ./src 4CPPFLAGS = -I$(SRC) 5DEBUG = -g 6OPTIMIZE = -O2 7GCCWARN = -Wall -Wstrict-prototypes 8CXXFLAGS = $(DEBUG) $(GCCWARN) $(OPTIMIZE) $(INCLUDES) 9 10LIB = ./libXmlRpc.a 11 12# Add your system-dependent network libs here. These are 13# only used to build the tests (your application will need them too). 14# Linux: none 15# Solaris: -lsocket -lnsl 16#SYSTEMLIBS = -lsocket -lnsl 17SYSTEMLIBS = 18LDLIBS = $(LIB) $(SYSTEMLIBS) 19 20OBJ = $(SRC)/XmlRpcClient.o $(SRC)/XmlRpcDispatch.o \ 21 $(SRC)/XmlRpcServer.o $(SRC)/XmlRpcServerConnection.o \ 22 $(SRC)/XmlRpcServerMethod.o $(SRC)/XmlRpcSocket.o $(SRC)/XmlRpcSource.o \ 23 $(SRC)/XmlRpcUtil.o $(SRC)/XmlRpcValue.o 24 25all: $(LIB) tests 26 27$(LIB): $(OBJ) 28 $(AR) $(ARFLAGS) $(LIB) $(OBJ) 29 30 31tests: $(LIB) 32 cd test && $(MAKE) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" SYSTEMLIBS="$(SYSTEMLIBS)" 33 34doc doxygen: 35 cd src && doxygen Doxyfile 36 37clean: 38 rm -f $(SRC)/*.o 39 rm -f $(SRC)/*~ 40 rm -f $(LIB) 41 cd test && $(MAKE) clean 42 43