xref: /netbsd/external/bsd/am-utils/bin/amd/Makefile (revision 6550d01e)
1#	$NetBSD: Makefile,v 1.5 2010/02/08 07:56:38 plunky Exp $
2
3.include "${.CURDIR}/../Makefile.inc"
4
5PROG=	amd
6
7DIST=	${IDIST}/amd
8.PATH:	${DIST}
9
10SRCS=	am_ops.c amd.c amfs_auto.c amfs_generic.c amfs_direct.c \
11	amfs_error.c amfs_host.c \
12	amfs_link.c amfs_linkx.c amfs_nfsl.c amfs_nfsx.c \
13	amfs_program.c amfs_root.c amfs_toplvl.c amfs_union.c amq_subr.c \
14	amq_svc.c autil.c clock.c conf.c get_args.c info_exec.c info_file.c \
15	info_ndbm.c info_passwd.c info_sun.c \
16	info_union.c map.c mapc.c mntfs.c nfs_prot_svc.c nfs_start.c \
17	nfs_subr.c ops_cdfs.c ops_efs.c \
18	ops_mfs.c ops_nfs.c ops_nfs3.c ops_nullfs.c ops_pcfs.c \
19	ops_tfs.c ops_tmpfs.c ops_udf.c ops_ufs.c ops_umapfs.c ops_unionfs.c \
20	opts.c readdir.c restart.c rpc_fwd.c sched.c srvr_amfs_auto.c \
21	srvr_nfs.c sun_map.c sun_map_parse.y sun_map_tok.l \
22	conf_parse.y conf_tok.l
23
24.if (${USE_HESIOD} != "no")
25SRCS+=	info_hesiod.c
26.endif
27
28.if (${USE_LDAP} != "no")
29SRCS+=	info_ldap.c
30
31LDADD+=	-lldap
32DPADD+=	${LIBLDAP}
33.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != ""))
34LDADD+=	-llber
35DPADD+=	${LIBLBER}
36.if ${MKCRYPTO} != "no"
37DPADD+=	${LIBSSL} ${LIBCRYPTO}
38LDADD+=	-lssl -lcrypto
39.endif
40.endif
41.endif
42
43.if (${USE_YP} != "no")
44SRCS+=	info_nis.c
45.endif
46
47.if defined(HAVE_GCC) && ${HAVE_GCC} == 4
48COPTS.amq_subr.c+=	-fno-strict-aliasing
49.endif
50
51# the following are not supported on NetBSD
52#	info_ldap.c info_nisplus.c ops_cachefs.c ops_efs.c ops_lofs.c ops_xfs.c
53MAN+=	amd.8
54
55AMDOBJDIR!=cd ${.CURDIR} && ${PRINTOBJDIR}
56
57CPPFLAGS+=	-I${DIST} -I${AMDOBJDIR}
58LDADD+=		${LIBAMU} -lrpcsvc
59DPADD+=		${LIBRPCSVC}
60YHEADER=	1
61
62YPREFIX.sun_map_parse.y =	sun_map_
63LPREFIX.sun_map_tok.l =	sun_map_
64CPPFLAGS.sun_map_tok.c += -Dyylval=sun_map_lval -Dyyerror=sun_map_error
65
66YPREFIX.conf_parse.y =	conf_
67LPREFIX.conf_tok.l =	conf_
68CPPFLAGS.conf_tok.c += -Dyylval=conf_lval -Dyyerror=conf_error
69
70CLEANFILES+=	build_version.h
71DPSRCS+=	build_version.h
72
73get_args.o get_args.d: build_version.h
74
75build_version.h: get_args.c
76	${_MKTARGET_CREATE}
77	echo '#define AMU_BUILD_VERSION	1' > ${.TARGET}
78	echo '#define BUILD_USER "'unknown'"' >> ${.TARGET}
79	echo '#define BUILD_HOST "'unknown'"' >> ${.TARGET}
80	echo '#define BUILD_DATE "'unknown'"' >> ${.TARGET}
81
82
83.include <bsd.prog.mk>
84