# $Id: Makefile,v 1.32 2021/04/13 05:04:33 rlr Exp $

PROG=	fwobac
SRCS=	fwobac.c aabc.c base64.c captcha.c conf_parse.c fdk_hmac.c \
	file_utils.c html_utils.c mail.c net_addr.c rhf.c tmpl.c uc_utils.c \
	user.c utf8_utils.c

NOMAN=	noman

#DEBUG=	-g -DDEBUG

COPTS+=	-std=c99 -I/usr/local/include
COPTS+=	-Wall -pedantic -Wno-long-long -Wextra
COPTS+=	-Wstrict-prototypes -Wmissing-prototypes
COPTS+=	-Wmissing-declarations
COPTS+=	-Wshadow -Wpointer-arith -Wcast-qual
COPTS+=	-Wsign-compare
# Defines for a new, Undeadly-like site
# (without the need for backward-compatibility)
#COPTS+=	-DFEATURE_ADDR_BLOCK -DFEATURE_SEARCH -DFEATURE_THEMES
#COPTS+=	-DCOMPAT_BRAINDEAD_FB

LDSTATIC=	${STATIC}
LDADD=	-lcrypto -L/usr/local/lib -lkcgi -lz

BINDIR= /var/www/cgi-bin

aabc.o:	aabc.c aabc.h
base64.o:	base64.c base64.h
captcha.o:	captcha.c captcha.h aabc.h base64.h fdk_hmac.h
conf_parse.o:	conf_parse.c conf_parse.h
file_utils.o:	file_utils.c file_utils.h base64.h
html_utils.o:	html_utils.c html_utils.h uc_utils.h utf8_utils.h
mail.o:	mail.c mail.h
rhf.o:	rhf.c rhf.h
tmpl.o:	tmpl.c tmpl.h
uc_utils.o:	uc_utils.c uc_utils.h
user.o:	user.c user.h
utf8_utils.o:	utf8_utils.c utf8_utils.c

fwobac.o: \
		fwobac.c fwobac.h \
		base64.h captcha.h conf_parse.h fdk_hmac.h file_utils.h \
		html_utils.h mail.h net_addr.h rhf.h tmpl.h uc_utils.h user.h \
		utf8_utils.h version.h

.include <bsd.prog.mk>

