Blob


1 .PATH:${.CURDIR}/../lib
2 .PATH:${.CURDIR}/../template
4 SUBDIR = libexec
6 .include "../got-version.mk"
7 .include "Makefile.inc"
9 PROG = gotwebd
10 SRCS = config.c sockets.c log.c gotwebd.c parse.y proc.c \
11 fcgi.c gotweb.c got_operations.c tmpl.c pages.c
12 SRCS += blame.c commit_graph.c delta.c diff.c \
13 diffreg.c error.c fileindex.c object.c object_cache.c \
14 object_idset.c object_parse.c opentemp.c path.c pack.c \
15 privsep.c reference.c repository.c hash.c worktree.c \
16 utf8.c inflate.c buf.c rcsutil.c diff3.c \
17 lockfile.c deflate.c object_create.c delta_cache.c \
18 gotconfig.c diff_main.c diff_atomize_text.c diff_myers.c \
19 diff_output.c diff_output_plain.c diff_output_unidiff.c \
20 diff_output_edscript.c diff_patience.c bloom.c murmurhash2.c \
21 worktree_open.c patch.c sigs.c date.c sockaddr.c \
22 object_open_privsep.c read_gitconfig_privsep.c \
23 read_gotconfig_privsep.c pollfd.c reference_parse.c \
24 object_qid.c
26 .if exists(${.CURDIR}/../template/obj/template)
27 TEMPLATE = ${.CURDIR}/../template/obj/template
28 .else
29 TEMPLATE = ${.CURDIR}/../template/template
30 .endif
32 .SUFFIXES: .tmpl
33 .tmpl.c:
34 ${TEMPLATE} -o $@ $<
36 CLEANFILES = pages.c
38 MAN = ${PROG}.conf.5 ${PROG}.8
40 CPPFLAGS += -I${.CURDIR}/../include -I${.CURDIR}/../lib -I${.CURDIR}
41 CPPFLAGS += -I${.CURDIR}/../template
42 LDADD += -lz -levent -lutil -lm
43 YFLAGS =
44 DPADD = ${LIBEVENT} ${LIBUTIL} ${LIBM}
45 #CFLAGS += -DGOT_NO_OBJ_CACHE
47 .if ${GOT_RELEASE} != "Yes"
48 NOMAN = Yes
49 .endif
51 .if defined(PROFILE)
52 CPPFLAGS += -DPROFILE
53 DEBUG = -O0 -pg -g -static
54 .else
55 DEBUG = -O0 -g
56 .endif
58 realinstall:
59 if [ ! -d ${DESTDIR}${PUB_REPOS_DIR}/. ]; then \
60 ${INSTALL} -d -o root -g daemon -m 755 ${DESTDIR}${PUB_REPOS_DIR}; \
61 fi
62 ${INSTALL} -c -o root -g daemon -m 0755 ${PROG} ${BINDIR}/${PROG}
63 if [ ! -d ${DESTDIR}${HTTPD_DIR}/. ]; then \
64 ${INSTALL} -d -o root -g daemon -m 755 ${DESTDIR}${HTTPD_DIR}; \
65 fi
66 if [ ! -d ${DESTDIR}${PROG_DIR}/. ]; then \
67 ${INSTALL} -d -o root -g daemon -m 755 ${DESTDIR}${PROG_DIR}; \
68 fi
69 ${INSTALL} -c -o ${WWWUSR} -g ${WWWGRP} -m 0644 \
70 ${.CURDIR}/files/htdocs/${PROG}/* ${DESTDIR}${PROG_DIR}
72 .include <bsd.prog.mk>