]> git.saurik.com Git - apple/xnu.git/blob - iokit/DriverKit/Makefile
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / iokit / DriverKit / Makefile
1 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
6 IIG_INCFLAGS = -I$(SRCROOT)/iokit -I$(SRCROOT)/osfmk -I$(SRCROOT)/bsd -I$(OBJROOT)/bsd $(INCFLAGS_EXTERN)
7 OTHER_IIG_CFLAGS = $(IIG_INCFLAGS) -isysroot $(SDKROOT) -x c++ -std=gnu++1z -D__IIG=1 -DDRIVERKIT_PRIVATE=1 $(DEPLOYMENT_TARGET_DEFINES)
8
9 INCDIR = $(FRAMEDIR)/$(DKIT_INCDIR)
10 DRIVERKITINCDIR = $(DRIVERKITFRAMEDIR)/$(DRIVERKIT_DKIT_INCDIR)
11 LCLDIR = $(FRAMEDIR)/$(DKIT_PINCDIR)
12
13 include $(MakeInc_cmd)
14 include $(MakeInc_def)
15
16 ALL_DEFS = $(notdir $(wildcard $(SOURCE)*.iig))
17 ALL_HDRS = $(notdir $(wildcard $(SOURCE)*.h))
18
19 EXPINC_SUBDIRS = ${INSTINC_SUBDIRS}
20
21 INSTALL_MI_DIR = .
22
23 EXPORT_MI_DIR = DriverKit
24
25 GENERATED_HEADERS = $(patsubst %.iig,%.h,$(ALL_DEFS))
26
27 GENERATED_IMPL = $(patsubst %.iig,%.iig.cpp,$(ALL_DEFS))
28
29 INSTALL_MI_LIST = $(ALL_DEFS)
30 INSTALL_DRIVERKIT_MI_LIST = $(ALL_DEFS)
31
32 OTHER_HEADERS = IOTypes.h IOReturn.h IORPC.h IOKitKeys.h
33
34 EXPORT_MI_GEN_LIST = $(GENERATED_HEADERS) $(OTHER_HEADERS)
35 INSTALL_MI_GEN_LIST = $(GENERATED_HEADERS) $(OTHER_HEADERS)
36 INSTALL_DRIVERKIT_MI_GEN_LIST = $(GENERATED_HEADERS) $(OTHER_HEADERS)
37 INSTALL_KF_MI_GEN_LIST = $(GENERATED_HEADERS) $(OTHER_HEADERS)
38
39 COMP_FILES = ${GENERATED_HEADERS} $(GENERATED_IMPL)
40
41 $(GENERATED_HEADERS) : \
42 %.h : %.iig
43 @$(LOG_IIG) "$@"
44 $(_v)$(IIG) --def $< --header $@ --impl $(patsubst %.h,%.iig.cpp,$@) --framework-name DriverKit ${OTHER_IIG_FLAGS} -- ${OTHER_IIG_CFLAGS} $(_vstdout)
45
46 $(GENERATED_IMPL) : $(GENERATED_HEADERS)
47
48 do_build_all:: $(COMP_FILES)
49
50 include $(MakeInc_rule)
51 include $(MakeInc_dir)