# Makefile for http_post

# 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_INCDIR and SSL_LIBDIR
# definitions point to your OpenSSL installation.
#SSL_INCDIR =	/usr/local/include
#SSL_LIBDIR =	/usr/local/lib
#SSL_DEFS =	-DUSE_SSL
#SSL_INC =	-I$(SSL_INCDIR)
#SSL_LIBS =	-L$(SSL_LIBDIR) -lssl -lcrypto -lRSAglue -lrsaref


BINDIR =	/usr/local/bin
MANDIR =	/usr/local/man/man1

ifdef DEBUG
CFLAGS =        -g $(SSL_DEFS) $(SSL_INC) $(EXTRACFLAGS)
LDFLAGS =       -g $(SSL_LIBS) $(SYSV_LIBS)
else
CFLAGS =        -O3 $(SSL_DEFS) $(SSL_INC) $(EXTRACFLAGS)
LDFLAGS =       $(SSL_LIBS) $(SYSV_LIBS)
endif

build:		http_post$(EXE)

http_post$(EXE):	http_post.c
	$(CC) $(CFLAGS) http_post.c $(LDFLAGS) -o http_post$(EXE)

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


clean:
	rm -f http_post$(EXE) *.o core core.* *.core *~
