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
25 .if exists(${.CURDIR}/../template/obj/template)
26 TEMPLATE = ${.CURDIR}/../template/obj/template
27 .else
28 TEMPLATE = ${.CURDIR}/../template/template
29 .endif
31 .SUFFIXES: .tmpl
32 .tmpl.c:
33 ${TEMPLATE} -o $@ $<
35 CLEANFILES = pages.c
37 MAN = ${PROG}.conf.5 ${PROG}.8
39 CPPFLAGS += -I${.CURDIR}/../include -I${.CURDIR}/../lib -I${.CURDIR}
40 CPPFLAGS += -I${.CURDIR}/../template
41 LDADD += -lz -levent -lutil -lm
42 YFLAGS =
43 DPADD = ${LIBEVENT} ${LIBUTIL}
44 #CFLAGS += -DGOT_NO_OBJ_CACHE
46 .if ${GOT_RELEASE} != "Yes"
47 NOMAN = Yes
48 .endif
50 .if defined(PROFILE)
51 CPPFLAGS += -DPROFILE
52 DEBUG = -O0 -pg -g -static
53 .else
54 DEBUG = -O0 -g
55 .endif
57 realinstall:
58 if [ ! -d ${DESTDIR}${PUB_REPOS_DIR}/. ]; then \
59 ${INSTALL} -d -o root -g daemon -m 755 ${DESTDIR}${PUB_REPOS_DIR}; \
60 fi
61 ${INSTALL} -c -o root -g daemon -m 0755 ${PROG} ${BINDIR}/${PROG}
62 if [ ! -d ${DESTDIR}${HTTPD_DIR}/. ]; then \
63 ${INSTALL} -d -o root -g daemon -m 755 ${DESTDIR}${HTTPD_DIR}; \
64 fi
65 if [ ! -d ${DESTDIR}${PROG_DIR}/. ]; then \
66 ${INSTALL} -d -o root -g daemon -m 755 ${DESTDIR}${PROG_DIR}; \
67 fi
68 ${INSTALL} -c -o ${WWWUSR} -g ${WWWGRP} -m 0644 \
69 ${.CURDIR}/files/htdocs/${PROG}/* ${DESTDIR}${PROG_DIR}
71 .include <bsd.prog.mk>