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