1 # $NetBSD: Makefile,v 1.15 2023/06/03 09:09:03 lukem Exp $ 2 3 .include "${.CURDIR}/../Makefile.inc" 4 5 PROG= amd 6 7 DIST= ${IDIST}/amd 8 .PATH: ${DIST} 9 10 SRCS= 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") 25 SRCS+= info_hesiod.c 26 .endif 27 28 .if (${USE_LDAP} != "no") 29 SRCS+= info_ldap.c 30 31 LDADD+= ${LIBLDAP_LDADD} 32 DPADD+= ${LIBLDAP_DPADD} 33 .endif 34 35 .if (${USE_YP} != "no") 36 SRCS+= info_nis.c 37 .endif 38 39 # the following are not supported on NetBSD 40 # info_ldap.c info_nisplus.c ops_cachefs.c ops_efs.c ops_lofs.c ops_xfs.c 41 MAN+= amd.8 42 43 AMDOBJDIR!=cd ${.CURDIR} && ${PRINTOBJDIR} 44 45 CPPFLAGS+= -I${DIST} -I${AMDOBJDIR} 46 LDADD+= -lrpcsvc 47 DPADD+= ${LIBRPCSVC} 48 YHEADER= 1 49 50 YPREFIX.sun_map_parse.y = sun_map_ 51 LPREFIX.sun_map_tok.l = sun_map_ 52 53 CWARNFLAGS.clang+= -Wno-unneeded-internal-declaration 54 55 YPREFIX.conf_parse.y = conf_ 56 LPREFIX.conf_tok.l = conf_ 57 58 CLEANFILES+= build_version.h 59 DPSRCS+= build_version.h 60 61 get_args.o get_args.d: build_version.h 62 63 build_version.h: get_args.c 64 ${_MKTARGET_CREATE} 65 echo '#define AMU_BUILD_VERSION 1' > ${.TARGET} 66 echo '#define BUILD_USER "'unknown'"' >> ${.TARGET} 67 echo '#define BUILD_HOST "'unknown'"' >> ${.TARGET} 68 echo '#define BUILD_DATE "'unknown'"' >> ${.TARGET} 69 70 COPTS.sun_map.c+= ${CC_WNO_STRINGOP_TRUNCATION} 71 72 .include <bsd.prog.mk> 73