summaryrefslogtreecommitdiff
path: root/pkg/openntpd/gen.lua
blob: 01265f2d482cb30a114f10e5c6a7d99e55fe8c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cflags{
	'-D _GNU_SOURCE',
	'-include $dir/config.h',
	'-I $srcdir/src',
	'-I $srcdir/include',
	'-I pkg/openbsd/include',
	'-I $builddir/pkg/libressl/include',
}

yacc('parse', '$srcdir/src/parse.y')
exe('ntpd', [[
	src/(
		client.c
		config.c
		constraint.c
		control.c
		fake-sensors.c
		log.c
		ntp.c
		ntp_dns.c
		ntp_msg.c
		ntpd.c
		server.c
		util.c
	)
	compat/(
		adjfreq_linux.c
		closefrom.c
		freezero.c
		imsg.c
		imsg-buffer.c
		md5.c
		progname.c
		setproctitle.c
	)
	$outdir/parse.tab.c
	$builddir/pkg/(
		libressl/(libcrypto.a.d libtls.a.d)
		openbsd/libbsd.a.d
	)
]], {'pkg/libressl/headers'})
file('bin/ntpd', '755', '$outdir/ntpd')
sym('bin/ntpctl', 'ntpd')
man{'src/ntpd.conf.5', 'src/ntpd.8', 'src/ntpctl.8'}

fetch 'curl'