]> git.saurik.com Git - apple/security.git/blob - cdsa/generator.mk
Security-54.1.3.tar.gz
[apple/security.git] / cdsa / generator.mk
1 # Makefile for generated files.
2
3 PERL=/usr/bin/perl
4
5 CDSA_HEADERS_DIR = $(SRCROOT)/cdsa/cdsa
6 SECURITY_HEADERS_DIR = $(SRCROOT)/cdsa/cdsa_utilities
7 CDSA_SOURCES_DIR = $(SRCROOT)/cdsa/cssm
8 KEYCHAIN_SOURCES_DIR = $(SRCROOT)/Keychain
9 CSPDL_SOURCES_DIR = $(SRCROOT)/AppleCSPDL
10 CDSA_UTILITIES_DIR = $(SRCROOT)/cdsa/cdsa_utilities
11 CDSA_PLUGINLIB_DIR = $(SRCROOT)/cdsa/cdsa_pluginlib
12 GEN_SOURCE_DIR = $(BUILT_PRODUCTS_DIR)/derived_src
13 GEN_HEADER_DIR = $(BUILT_PRODUCTS_DIR)/include/Security
14
15 GEN_ERRORCODES = $(CDSA_UTILITIES_DIR)/generator.pl
16 ERRORCODES_GEN = $(patsubst %,$(GEN_SOURCE_DIR)/%,errorcodes.gen)
17 ERRORCODES_DEPENDS = $(GEN_ERRORCODES)\
18 $(patsubst %,$(CDSA_HEADERS_DIR)/%,cssmerr.h)\
19 $(patsubst %,$(CDSA_HEADERS_DIR)/%,cssmapple.h)
20
21 GEN_APIGLUE = $(CDSA_SOURCES_DIR)/generator.pl
22 APIGLUE_GEN = $(patsubst %,$(GEN_SOURCE_DIR)/%,transition.gen funcnames.gen generator.rpt)
23 APIGLUE_DEPENDS = $(patsubst %,$(CDSA_SOURCES_DIR)/%, generator.pl generator.cfg)\
24 $(patsubst %,$(CDSA_HEADERS_DIR)/%,cssmapi.h cssmtype.h cssmconfig.h cssmaci.h cssmcspi.h cssmdli.h cssmcli.h cssmtpi.h)
25
26 GEN_SPIGLUE = $(CDSA_PLUGINLIB_DIR)/generator.pl
27 SPIGLUE_GEN = $(patsubst %,$(GEN_HEADER_DIR)/%,ACabstractsession.h CLabstractsession.h CSPabstractsession.h DLabstractsession.h TPabstractsession.h)\
28 $(patsubst %,$(GEN_SOURCE_DIR)/%,ACabstractsession.cpp CLabstractsession.cpp CSPabstractsession.cpp DLabstractsession.cpp TPabstractsession.cpp)
29 SPIGLUE_DEPENDS = $(patsubst %,$(CDSA_PLUGINLIB_DIR)/%,generator.pl generator.cfg)\
30 $(patsubst %,$(CDSA_HEADERS_DIR)/%,cssmapi.h cssmtype.h cssmconfig.h cssmaci.h cssmcli.h cssmcspi.h cssmdli.h cssmspi.h)
31
32 SCHEMA_GEN = $(patsubst %,$(GEN_SOURCE_DIR)/%,Schema.cpp)
33 SCHEMA_DEPENDS = $(patsubst %,$(KEYCHAIN_SOURCES_DIR)/%,Schema.m4)
34
35 KEYSCHEMA_GEN = $(patsubst %,$(GEN_SOURCE_DIR)/%,KeySchema.cpp)
36 KEYSCHEMA_DEPENDS = $(patsubst %,$(CSPDL_SOURCES_DIR)/%,KeySchema.m4)
37
38 build: $(ERRORCODES_GEN) $(APIGLUE_GEN) $(SPIGLUE_GEN) $(SCHEMA_GEN) $(KEYSCHEMA_GEN)
39
40 debug: build
41
42 profile: build
43
44 install: build
45
46 installhdrs: $(SPIGLUE_GEN)
47
48 installsrc:
49
50 clean:
51 rm -f $(ERRORCODES_GEN) $(APIGLUE_GEN) $(SPIGLUE_GEN) $(SCHEMA_GEN) $(KEYSCHEMA_GEN)
52
53 .PHONY: build clean debug profile
54
55 $(ERRORCODES_GEN): $(ERRORCODES_DEPENDS)
56 mkdir -p $(GEN_SOURCE_DIR)
57 $(PERL) $(CDSA_UTILITIES_DIR)/generator.pl $(CDSA_HEADERS_DIR) $(GEN_SOURCE_DIR)
58
59 $(APIGLUE_GEN): $(APIGLUE_DEPENDS)
60 mkdir -p $(GEN_SOURCE_DIR)
61 $(PERL) $(CDSA_SOURCES_DIR)/generator.pl $(CDSA_HEADERS_DIR) $(CDSA_SOURCES_DIR)/generator.cfg $(GEN_SOURCE_DIR)
62
63 $(SPIGLUE_GEN): $(SPIGLUE_DEPENDS)
64 mkdir -p $(GEN_HEADER_DIR)
65 mkdir -p $(GEN_SOURCE_DIR)
66 $(PERL) $(CDSA_PLUGINLIB_DIR)/generator.pl $(CDSA_HEADERS_DIR) $(CDSA_PLUGINLIB_DIR)/generator.cfg $(GEN_HEADER_DIR) $(GEN_SOURCE_DIR)
67
68 $(SCHEMA_GEN): $(SCHEMA_DEPENDS)
69 mkdir -p $(GEN_SOURCE_DIR)
70 m4 $(SCHEMA_DEPENDS) > $(SCHEMA_GEN)
71
72 $(KEYSCHEMA_GEN): $(KEYSCHEMA_DEPENDS)
73 mkdir -p $(GEN_SOURCE_DIR)
74 m4 $(KEYSCHEMA_DEPENDS) > $(KEYSCHEMA_GEN)