1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5PACKAGE=lib${LIB} 6LIB= sysdecode 7 8SRCS= errno.c flags.c ioctl.c signal.c syscallnames.c utrace.c 9INCS= sysdecode.h 10 11CFLAGS+= -I${.OBJDIR} 12CFLAGS+= -I${SRCTOP}/sys 13CFLAGS+= -I${SRCTOP}/libexec/rtld-elf 14 15MAN= sysdecode.3 \ 16 sysdecode_abi_to_freebsd_errno.3 \ 17 sysdecode_cap_rights.3 \ 18 sysdecode_enum.3 \ 19 sysdecode_fcntl_arg.3 \ 20 sysdecode_ioctlname.3 \ 21 sysdecode_mask.3 \ 22 sysdecode_quotactl_cmd.3 \ 23 sysdecode_sigcode.3 \ 24 sysdecode_sockopt_name.3 \ 25 sysdecode_socket_protocol.3 \ 26 sysdecode_syscallnames.3 \ 27 sysdecode_utrace.3 28MLINKS= sysdecode_abi_to_freebsd_errno.3 sysdecode_freebsd_to_abi_errno.3 29MLINKS+=sysdecode_enum.3 sysdecode_acltype.3 \ 30 sysdecode_enum.3 sysdecode_atfd.3 \ 31 sysdecode_enum.3 sysdecode_extattrnamespace.3 \ 32 sysdecode_enum.3 sysdecode_fadvice.3 \ 33 sysdecode_enum.3 sysdecode_fcntl_cmd.3 \ 34 sysdecode_enum.3 sysdecode_getfsstat_mode.3 \ 35 sysdecode_enum.3 sysdecode_getrusage_who.3 \ 36 sysdecode_enum.3 sysdecode_idtype.3 \ 37 sysdecode_enum.3 sysdecode_ipproto.3 \ 38 sysdecode_enum.3 sysdecode_kldsym_cmd.3 \ 39 sysdecode_enum.3 sysdecode_kldunload_flags.3 \ 40 sysdecode_enum.3 sysdecode_lio_listio_mode.3 \ 41 sysdecode_enum.3 sysdecode_madvice.3 \ 42 sysdecode_enum.3 sysdecode_minherit_flags.3 \ 43 sysdecode_enum.3 sysdecode_msgctl_cmd.3 \ 44 sysdecode_enum.3 sysdecode_nfssvc_flags.3 \ 45 sysdecode_enum.3 sysdecode_pathconf_name.3 \ 46 sysdecode_enum.3 sysdecode_prio_which.3 \ 47 sysdecode_enum.3 sysdecode_procctl_cmd.3 \ 48 sysdecode_enum.3 sysdecode_ptrace_request.3 \ 49 sysdecode_enum.3 sysdecode_rlimit.3 \ 50 sysdecode_enum.3 sysdecode_rtprio_function.3 \ 51 sysdecode_enum.3 sysdecode_scheduler_policy.3 \ 52 sysdecode_enum.3 sysdecode_semctl_cmd.3 \ 53 sysdecode_enum.3 sysdecode_shmctl_cmd.3 \ 54 sysdecode_enum.3 sysdecode_shutdown_how.3 \ 55 sysdecode_enum.3 sysdecode_sigbus_code.3 \ 56 sysdecode_enum.3 sysdecode_sigchld_code.3 \ 57 sysdecode_enum.3 sysdecode_sigfpe_code.3 \ 58 sysdecode_enum.3 sysdecode_sigill_code.3 \ 59 sysdecode_enum.3 sysdecode_signal.3 \ 60 sysdecode_enum.3 sysdecode_sigprocmask_how.3 \ 61 sysdecode_enum.3 sysdecode_sigsegv_code.3 \ 62 sysdecode_enum.3 sysdecode_sigtrap_code.3 \ 63 sysdecode_enum.3 sysdecode_sockaddr_family.3 \ 64 sysdecode_enum.3 sysdecode_socketdomain.3 \ 65 sysdecode_enum.3 sysdecode_sockettype.3 \ 66 sysdecode_enum.3 sysdecode_sockopt_level.3 \ 67 sysdecode_enum.3 sysdecode_sysarch_number.3 \ 68 sysdecode_enum.3 sysdecode_umtx_op.3 \ 69 sysdecode_enum.3 sysdecode_vmresult.3 \ 70 sysdecode_enum.3 sysdecode_whence.3 71MLINKS+=sysdecode_fcntl_arg.3 sysdecode_fcntl_arg_p.3 72MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ 73 sysdecode_mask.3 sysdecode_atflags.3 \ 74 sysdecode_mask.3 sysdecode_capfcntlrights.3 \ 75 sysdecode_mask.3 sysdecode_fcntl_fileflags.3 \ 76 sysdecode_mask.3 sysdecode_fileflags.3 \ 77 sysdecode_mask.3 sysdecode_filemode.3 \ 78 sysdecode_mask.3 sysdecode_flock_operation.3 \ 79 sysdecode_mask.3 sysdecode_mlockall_flags.3 \ 80 sysdecode_mask.3 sysdecode_mmap_flags.3 \ 81 sysdecode_mask.3 sysdecode_mmap_prot.3 \ 82 sysdecode_mask.3 sysdecode_mount_flags.3 \ 83 sysdecode_mask.3 sysdecode_msg_flags.3 \ 84 sysdecode_mask.3 sysdecode_msync_flags.3 \ 85 sysdecode_mask.3 sysdecode_open_flags.3 \ 86 sysdecode_mask.3 sysdecode_pipe2_flags.3 \ 87 sysdecode_mask.3 sysdecode_reboot_howto.3 \ 88 sysdecode_mask.3 sysdecode_rfork_flags.3 \ 89 sysdecode_mask.3 sysdecode_semget_flags.3 \ 90 sysdecode_mask.3 sysdecode_sendfile_flags.3 \ 91 sysdecode_mask.3 sysdecode_shmat_flags.3 \ 92 sysdecode_mask.3 sysdecode_socket_type.3 \ 93 sysdecode_mask.3 sysdecode_thr_create_flags.3 \ 94 sysdecode_mask.3 sysdecode_umtx_cvwait_flags.3 \ 95 sysdecode_mask.3 sysdecode_umtx_rwlock_flags.3 \ 96 sysdecode_mask.3 sysdecode_vmprot.3 \ 97 sysdecode_mask.3 sysdecode_wait4_options.3 \ 98 sysdecode_mask.3 sysdecode_wait6_options.3 99 100CLEANFILES= ioctl.c tables.h 101 102.if defined(COMPAT_32BIT) 103CPP+= -m32 104.endif 105 106.if ${MK_PF} != "no" 107CFLAGS+=-DPF 108.endif 109 110# Workaround duplicate declarations in <netinet/ip_compat.h> 111CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls 112 113# Workaround warning for unused ssi_cables[] in <dev/lmc/if_lmc.h> 114CFLAGS.gcc.ioctl.c+= -Wno-unused 115 116CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} 117 118DEPENDOBJS+= tables.h 119tables.h: mktables 120 sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} 121 122# mkioctls runs find(1) for headers so needs to rebuild every time. This used 123# to be a hack only done in buildworld. 124.if !defined(_SKIP_BUILD) 125ioctl.c: .PHONY 126.endif 127ioctl.c: mkioctls .META 128 env CPP="${CPP}" MK_PF="${MK_PF}" \ 129 /bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET} 130 131beforedepend: ioctl.c tables.h 132 133.include <bsd.lib.mk> 134