1# 2# SPDX-License-Identifier: BSD-2-Clause 3# 4# Copyright (c) 2025 FreeBSD Foundation 5# 6# This sofware was developed by Cy Schubert <cy@FreeBSD.org> 7# under sponsorship from the FreeBSD Foundation. 8# 9 10.include <src.opts.mk> 11 12.include "../Makefile.inc" 13 14LIB= krb5profile 15LIBADD= com_err krb5support 16VERSION_MAP= ${.CURDIR}/version.map 17 18SRCS= prof_file.c \ 19 prof_get.c \ 20 prof_init.c \ 21 prof_parse.c \ 22 prof_set.c \ 23 prof_tree.c \ 24 argv_parse.h \ 25 prof_int.h \ 26 ${GEN} 27 28INCS= profile.h 29 30DEFINES=-DHAS_STDARG -DLIBDIR=\"${KRB5_LIBDIR}\" 31 32CFLAGS+=${DEFINES} \ 33 -I${KRB5_DIR}/util/profile \ 34 -I${KRB5_DIR}/util/et \ 35 -I${KRB5_SRCTOP}/include \ 36 -I${KRB5_DIR}/include \ 37 -I${.OBJDIR} 38 39GEN= profile.h ${GEN_PROF_ERR_C} ${GEN_PROF_ERR_H} 40GEN_PROF_ERR= prof_err.et 41GEN_PROF_ERR_C= ${GEN_PROF_ERR:S/.et$/.c/} 42GEN_PROF_ERR_H= ${GEN_PROF_ERR:S/.et$/.h/} 43${GEN_PROF_ERR:[2..-1]}: .NOMETA 44CLEANFILES= et-h-prof_err.et et-h-prof_err.c et-h-prof_err.h \ 45 ${GEN} 46 47.include "${KRB5_SRCTOP}/Makefile.et" 48 49${GEN_PROF_ERR_H}: ${GEN_PROF_ERR} 50 rm -f et-h-${.PREFIX}.et et-h-${.PREFIX}.c et-h-${.PREFIX}.h 51 cp ${.ALLSRC} et-h-${.PREFIX}.et 52 ${COMPILE_ET} et-h-${.PREFIX}.et 53 mv et-h-${.PREFIX}.h ${.PREFIX}.h 54 rm -f et-h-${.PREFIX}.et et-h-${.PREFIX}.h 55 56${GEN_PROF_ERR_C}: ${GEN_PROF_ERR} 57 rm -f et-c-${.PREFIX}.et et-c-${.PREFIX}.c et-c-${.PREFIX}.h 58 cp ${.ALLSRC} et-c-${.PREFIX}.et 59 ${COMPILE_ET} et-c-${.PREFIX}.et 60 mv et-c-${.PREFIX}.c ${.PREFIX}.c 61 rm -f et-c-${.PREFIX}.et et-c-${.PREFIX}.c 62 63profile.h: profile.hin prof_err.h 64 cat ${.ALLSRC} > ${.TARGET} 65 66prof_file.c: profile.h 67 68.include <bsd.lib.mk> 69 70.SUFFIXES: .et 71 72.PATH: ${KRB5_DIR}/util/profile 73