1export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd 2export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def 3export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule 4export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir 5 6include $(MakeInc_cmd) 7include $(MakeInc_def) 8 9MIG_DEFS = \ 10 device.defs 11 12MIG_HDRS = \ 13 14DATAFILES = \ 15 device_types.h device_port.h device_types.defs \ 16 ${MIG_DEFS} 17 18MODULEMAPFILES = \ 19 device.modulemap 20 21PRIVATE_DATAFILES = \ 22 device_types.h 23 24# device_types.h has some userspace IOKit types that are used by 25# IOTypes.h clients. The types are guarded by `IOKIT` because they 26# conflict with internal xnu types. However, once device_types.h 27# is part of the Darwin module, it gets processed before IOTypes.h 28# defines IOKIT. Later when IOTypes.h includes the header, it's 29# too late and the types don't get defined. Remove the IOKIT guard 30# in userspace to fix that problem and always define the IOKit types. 31KERNEL_ONLY_GUARDS_UNIFDEF = -DIOKIT 32 33MIGINCLUDES = \ 34 35INSTALL_MI_LIST = ${DATAFILES} ${_MIG_HDRS_} ${MIGINCLUDES} 36 37INSTALL_MODULEMAP_MI_LIST = ${MODULEMAPFILES} 38 39INSTALL_SF_MI_LCL_LIST = ${DATAFILES} ${PRIVATE_DATAFILES} ${_MIG_HDRS_} ${MIGINCLUDES} 40 41INSTALL_MI_DIR = device 42 43EXPORT_MI_LIST = ${DATAFILES} ${_MIG_HDRS_} ${MIGINCLUDES} 44 45EXPORT_MI_DIR = device 46 47# 48# Build path 49# 50INCFLAGS_MAKEFILE= -I.. 51 52DEVICE_FILES = device_server.h device_server.c 53 54COMP_FILES = ${DEVICE_FILES} 55 56do_build_all:: $(COMP_FILES) 57 58${DEVICE_FILES}: device.defs 59 @$(LOG_MIG) "$@" 60 $(_v)${MIG} ${MIGFLAGS} ${MIGKSFLAGS} \ 61 -header /dev/null \ 62 -user /dev/null \ 63 -sheader device_server.h \ 64 -server device_server.c \ 65 $< 66 67include $(MakeInc_rule) 68include $(MakeInc_dir) 69