# Makefile for xmlrpc

# CONFIGURE: If you are using a SystemV-based operating system, such as
# Solaris, you will need to uncomment this definition.
#SYSV_LIBS =	-lnsl -lsocket

# CONFIGURE: If you want to compile in support for https, uncomment these
# definitions.  You will need to have already built OpenSSL, available at
# http://www.openssl.org/  Make sure the SSL_TREE definition points to the
# tree with your OpenSSL installation - depending on how you installed it,
# it may be in /usr/local instead of /usr/local/ssl.
#SSL_TREE =     /usr/local/ssl
#SSL_DEFS =	-DUSE_SSL
#SSL_INC =	-I$(SSL_TREE)/include
#SSL_LIBS =	-L$(SSL_TREE)/lib -lssl -lcrypto


BINDIR =	/usr/local/bin
MANDIR =	/usr/local/man/man1
CC =		gcc
CFLAGS =	-Wall -O $(SSL_DEFS) $(SSL_INC)
#CFLAGS =	-Wall -g $(SSL_DEFS) $(SSL_INC)
LDFLAGS =	-s $(SSL_LIBS) $(SYSV_LIBS)
#LDFLAGS =	-g $(SSL_LIBS) $(SYSV_LIBS)

all:		xmlrpc

xmlrpc:		xmlrpc.c tdate_parse.h tdate_parse.o
	$(CC) $(CFLAGS) xmlrpc.c $(LDFLAGS) tdate_parse.o -o xmlrpc

tdate_parse.o:  tdate_parse.c tdate_parse.h
	$(CC) $(CFLAGS) -c tdate_parse.c

install:	all
	rm -f $(BINDIR)/xmlrpc
	cp xmlrpc $(BINDIR)/xmlrpc
	rm -f $(BINDIR)/xmlrpc_results
	cp xmlrpc_results $(BINDIR)/xmlrpc_results
	rm -f $(MANDIR)/xmlrpc.1
	cp xmlrpc.1 $(MANDIR)/xmlrpc.1

clean:
	rm -f xmlrpc *.o core core.* *.core
