]> git.saurik.com Git - apple/security.git/blob - SecurityASN1/Makefile
Security-54.1.tar.gz
[apple/security.git] / SecurityASN1 / Makefile
1 #
2 # Makefile to build snacc-generated code for pkcs* and cms
3 #
4 ASN1_SRC= sm_vdatypes.asn sm_x501ud.asn sm_x411ub.asn sm_x411mtsas.asn \
5 sm_x501if.asn sm_x520sa.asn sm_x509cmn.asn sm_x509af.asn \
6 sm_x509ce.asn pkcs1oids.asn pkcs9oids.asn sm_cms.asn sm_ess.asn \
7 pkcs7.asn pkcs8.asn appleoids.asn pkcs10.asn
8
9 SNACC_SRC= $(SRCROOT)/..
10
11 GEN_SRC= $(ASN1_SRC:%.asn=%.cpp)
12 GEN_HDR= $(ASN1_SRC:%.asn=%.h)
13
14 PKCS_HOME=$(shell echo `pwd`)
15
16 ASN_SRC_DIR= $(PKCS_HOME)/asn
17 GEN_SRC_DIR= $(PKCS_HOME)/c++
18 GEN_HDR_DIR= $(PKCS_HOME)/inc
19
20 VPATH= $(ASN_SRC_DIR)
21
22 #
23 # get snacc headers from snacc project source, not from /usr/local/include
24 #
25 HDR_INCPATH= -I$(SNACC_SRC)/c++-lib/inc
26
27 #
28 # standard useful ASN1
29 #
30 ASN_USEFUL= asn-useful.asn1
31
32 #
33 # local build directory,
34 #
35 #LOCAL_BUILD= /Data_and_Apps/dmitchBuild
36 LOCAL_BUILD= $(BUILT_PRODUCTS_DIR)
37
38 CFLAGS= -g $(HDR_INCPATH) -DVDADER_RULES
39 LDFLAGS= -lstdc++ -lsnacc++ -L$(LOCAL_BUILD)
40
41 CC= /usr/bin/cc
42 SNACC= /usr/local/bin/snacc
43 SNACC_FLAGS= -C -D -u $(ASN_USEFUL)
44
45 first: $(GEN_SRC) move_genfiles
46
47 $(GEN_SRC):
48 (cd $(ASN_SRC_DIR); $(SNACC) $(SNACC_FLAGS) $(ASN1_SRC))
49
50 move_genfiles: clean_genfiles
51 (cd $(ASN_SRC_DIR); \
52 mv *.cpp $(GEN_SRC_DIR); \
53 mv *.h $(GEN_HDR_DIR))
54
55 clean_genfiles:
56 (cd $(GEN_SRC_DIR); rm -f *.cpp)
57 (cd $(GEN_HDR_DIR); rm -f *.h)
58
59 clean: clean_genfiles
60
61 install:
62
63 # anything else?
64
65