1292236Sjhb# $FreeBSD: stable/11/lib/libsysdecode/Makefile 361020 2020-05-13 21:16:02Z jhb $ 2292236Sjhb 3292236Sjhb.include <src.opts.mk> 4292236Sjhb 5298107SgjbPACKAGE=lib${LIB} 6292236SjhbLIB= sysdecode 7292236Sjhb 8311999SjhbSRCS= errno.c flags.c ioctl.c signal.c syscallnames.c utrace.c 9292236SjhbINCS= sysdecode.h 10292236Sjhb 11311999SjhbCFLAGS+= -I${.OBJDIR} 12313538SngieCFLAGS+= -I${SRCTOP}/sys 13313538SngieCFLAGS+= -I${SRCTOP}/libexec/rtld-elf 14294849Sjhb 15311999SjhbMAN= sysdecode.3 \ 16295931Sjhb sysdecode_abi_to_freebsd_errno.3 \ 17311999Sjhb sysdecode_cap_rights.3 \ 18332247Stuexen sysdecode_cmsg_type.3 \ 19311999Sjhb sysdecode_enum.3 \ 20311999Sjhb sysdecode_fcntl_arg.3 \ 21328454Sjhb sysdecode_kevent.3 \ 22292622Sjhb sysdecode_ioctlname.3 \ 23311999Sjhb sysdecode_mask.3 \ 24311999Sjhb sysdecode_quotactl_cmd.3 \ 25332244Stuexen sysdecode_sctp_sinfo_flags.3 \ 26311999Sjhb sysdecode_sigcode.3 \ 27311999Sjhb sysdecode_sockopt_name.3 \ 28319417Stuexen sysdecode_socket_protocol.3 \ 29294849Sjhb sysdecode_syscallnames.3 \ 30292236Sjhb sysdecode_utrace.3 31311999SjhbMLINKS= sysdecode_abi_to_freebsd_errno.3 sysdecode_freebsd_to_abi_errno.3 32311999SjhbMLINKS+=sysdecode_enum.3 sysdecode_acltype.3 \ 33311999Sjhb sysdecode_enum.3 sysdecode_atfd.3 \ 34311999Sjhb sysdecode_enum.3 sysdecode_extattrnamespace.3 \ 35311999Sjhb sysdecode_enum.3 sysdecode_fadvice.3 \ 36311999Sjhb sysdecode_enum.3 sysdecode_fcntl_cmd.3 \ 37311999Sjhb sysdecode_enum.3 sysdecode_getfsstat_mode.3 \ 38326044Sjhb sysdecode_enum.3 sysdecode_getrusage_who.3 \ 39311999Sjhb sysdecode_enum.3 sysdecode_idtype.3 \ 40311999Sjhb sysdecode_enum.3 sysdecode_ipproto.3 \ 41311999Sjhb sysdecode_enum.3 sysdecode_kldsym_cmd.3 \ 42311999Sjhb sysdecode_enum.3 sysdecode_kldunload_flags.3 \ 43311999Sjhb sysdecode_enum.3 sysdecode_lio_listio_mode.3 \ 44311999Sjhb sysdecode_enum.3 sysdecode_madvice.3 \ 45311999Sjhb sysdecode_enum.3 sysdecode_minherit_flags.3 \ 46311999Sjhb sysdecode_enum.3 sysdecode_msgctl_cmd.3 \ 47311999Sjhb sysdecode_enum.3 sysdecode_nfssvc_flags.3 \ 48326044Sjhb sysdecode_enum.3 sysdecode_pathconf_name.3 \ 49311999Sjhb sysdecode_enum.3 sysdecode_prio_which.3 \ 50311999Sjhb sysdecode_enum.3 sysdecode_procctl_cmd.3 \ 51311999Sjhb sysdecode_enum.3 sysdecode_ptrace_request.3 \ 52311999Sjhb sysdecode_enum.3 sysdecode_rlimit.3 \ 53311999Sjhb sysdecode_enum.3 sysdecode_rtprio_function.3 \ 54311999Sjhb sysdecode_enum.3 sysdecode_scheduler_policy.3 \ 55332243Stuexen sysdecode_enum.3 sysdecode_sctp_pr_policy.3 \ 56311999Sjhb sysdecode_enum.3 sysdecode_semctl_cmd.3 \ 57311999Sjhb sysdecode_enum.3 sysdecode_shmctl_cmd.3 \ 58311999Sjhb sysdecode_enum.3 sysdecode_shutdown_how.3 \ 59311999Sjhb sysdecode_enum.3 sysdecode_sigbus_code.3 \ 60311999Sjhb sysdecode_enum.3 sysdecode_sigchld_code.3 \ 61311999Sjhb sysdecode_enum.3 sysdecode_sigfpe_code.3 \ 62311999Sjhb sysdecode_enum.3 sysdecode_sigill_code.3 \ 63311999Sjhb sysdecode_enum.3 sysdecode_signal.3 \ 64311999Sjhb sysdecode_enum.3 sysdecode_sigprocmask_how.3 \ 65311999Sjhb sysdecode_enum.3 sysdecode_sigsegv_code.3 \ 66311999Sjhb sysdecode_enum.3 sysdecode_sigtrap_code.3 \ 67311999Sjhb sysdecode_enum.3 sysdecode_sockaddr_family.3 \ 68311999Sjhb sysdecode_enum.3 sysdecode_socketdomain.3 \ 69311999Sjhb sysdecode_enum.3 sysdecode_sockettype.3 \ 70311999Sjhb sysdecode_enum.3 sysdecode_sockopt_level.3 \ 71326044Sjhb sysdecode_enum.3 sysdecode_sysarch_number.3 \ 72311999Sjhb sysdecode_enum.3 sysdecode_umtx_op.3 \ 73311999Sjhb sysdecode_enum.3 sysdecode_vmresult.3 \ 74311999Sjhb sysdecode_enum.3 sysdecode_whence.3 75311999SjhbMLINKS+=sysdecode_fcntl_arg.3 sysdecode_fcntl_arg_p.3 76328454SjhbMLINKS+=sysdecode_kevent.3 sysdecode_kevent_fflags.3 \ 77328454Sjhb sysdecode_kevent.3 sysdecode_kevent_filter.3 \ 78328454Sjhb sysdecode_kevent.3 sysdecode_kevent_flags.3 79311999SjhbMLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ 80326044Sjhb sysdecode_mask.3 sysdecode_atflags.3 \ 81311999Sjhb sysdecode_mask.3 sysdecode_capfcntlrights.3 \ 82311999Sjhb sysdecode_mask.3 sysdecode_fcntl_fileflags.3 \ 83311999Sjhb sysdecode_mask.3 sysdecode_fileflags.3 \ 84311999Sjhb sysdecode_mask.3 sysdecode_filemode.3 \ 85311999Sjhb sysdecode_mask.3 sysdecode_flock_operation.3 \ 86311999Sjhb sysdecode_mask.3 sysdecode_mlockall_flags.3 \ 87311999Sjhb sysdecode_mask.3 sysdecode_mmap_flags.3 \ 88311999Sjhb sysdecode_mask.3 sysdecode_mmap_prot.3 \ 89311999Sjhb sysdecode_mask.3 sysdecode_mount_flags.3 \ 90311999Sjhb sysdecode_mask.3 sysdecode_msg_flags.3 \ 91311999Sjhb sysdecode_mask.3 sysdecode_msync_flags.3 \ 92311999Sjhb sysdecode_mask.3 sysdecode_open_flags.3 \ 93311999Sjhb sysdecode_mask.3 sysdecode_pipe2_flags.3 \ 94311999Sjhb sysdecode_mask.3 sysdecode_reboot_howto.3 \ 95311999Sjhb sysdecode_mask.3 sysdecode_rfork_flags.3 \ 96311999Sjhb sysdecode_mask.3 sysdecode_semget_flags.3 \ 97311999Sjhb sysdecode_mask.3 sysdecode_sendfile_flags.3 \ 98311999Sjhb sysdecode_mask.3 sysdecode_shmat_flags.3 \ 99332248Stuexen sysdecode_mask.3 sysdecode_sctp_nxt_flags.3 \ 100332248Stuexen sysdecode_mask.3 sysdecode_sctp_rcv_flags.3 \ 101332248Stuexen sysdecode_mask.3 sysdecode_sctp_snd_flags.3 \ 102311999Sjhb sysdecode_mask.3 sysdecode_socket_type.3 \ 103311999Sjhb sysdecode_mask.3 sysdecode_thr_create_flags.3 \ 104311999Sjhb sysdecode_mask.3 sysdecode_umtx_cvwait_flags.3 \ 105311999Sjhb sysdecode_mask.3 sysdecode_umtx_rwlock_flags.3 \ 106311999Sjhb sysdecode_mask.3 sysdecode_vmprot.3 \ 107311999Sjhb sysdecode_mask.3 sysdecode_wait4_options.3 \ 108311999Sjhb sysdecode_mask.3 sysdecode_wait6_options.3 109292236Sjhb 110351891SbdreweryCLEANFILES= ioctl.c ioctl.c.tmp tables.h 111292622Sjhb 112292622Sjhb.if defined(COMPAT_32BIT) 113292622SjhbCPP+= -m32 114292622Sjhb.endif 115292622Sjhb 116292622Sjhb.if ${MK_PF} != "no" 117292622SjhbCFLAGS+=-DPF 118292622Sjhb.endif 119292622Sjhb 120292622Sjhb# Workaround duplicate declarations in <netinet/ip_compat.h> 121292622SjhbCFLAGS.gcc.ioctl.c+= -Wno-redundant-decls 122294849Sjhb 123294849Sjhb# Workaround warning for unused ssi_cables[] in <dev/lmc/if_lmc.h> 124294849SjhbCFLAGS.gcc.ioctl.c+= -Wno-unused 125294849Sjhb 126361020Sjhb# Ignore deprecation warning in <sys/pioctl.h> 127361020SjhbCFLAGS.clang.ioctl.c+= -Wno-\#warnings 128361020Sjhb.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40700 129361020SjhbCFLAGS.gcc.ioctl.c+= -Wno-cpp 130361020Sjhb.endif 131361020Sjhb 132361020SjhbCFLAGS.clang+= ${CFLAGS.clang.${.IMPSRC}} 133292622SjhbCFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} 134292622Sjhb 135311999SjhbDEPENDOBJS+= tables.h 136311999Sjhbtables.h: mktables 137311999Sjhb sh ${.CURDIR}/mktables ${DESTDIR}${INCLUDEDIR} ${.TARGET} 138311999Sjhb 139311999Sjhb# mkioctls runs find(1) for headers so needs to rebuild every time. This used 140311999Sjhb# to be a hack only done in buildworld. 141311999Sjhb.if !defined(_SKIP_BUILD) 142311999Sjhbioctl.c: .PHONY 143311999Sjhb.endif 144311999Sjhbioctl.c: mkioctls .META 145321687Skp env MACHINE=${MACHINE} CPP="${CPP}" MK_PF="${MK_PF}" \ 146292622Sjhb /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET} 147292622Sjhb 148311999Sjhbbeforedepend: ioctl.c tables.h 149292622Sjhb 150292236Sjhb.include <bsd.lib.mk> 151