]> git.saurik.com Git - apple/security.git/blob - SecurityASN1/Makefile
Security-30.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
8
9 SNACC_SRC= $(SRCROOT)/..
10
11 GEN_SRC= $(ASN1_SRC:%.asn=%.cpp)
12 GEN_HDR= $(ASN1_SRC:%.asn=%.h)
13
14 ASN_SRC_DIR= $(SRCROOT)/asn
15 GEN_SRC_DIR= $(SRCROOT)/c++
16 GEN_HDR_DIR= $(SRCROOT)/inc
17
18 VPATH= $(ASN_SRC_DIR)
19
20 #
21 # get snacc headers from snacc project source, not from /usr/local/include
22 #
23 HDR_INCPATH= -I$(SNACC_SRC)/c++-lib/inc
24
25 #
26 # standard useful ASN1
27 #
28 ASN_USEFUL= asn-useful.asn1
29
30 #
31 # local build directory,
32 #
33 #LOCAL_BUILD= /Data_and_Apps/dmitchBuild
34 LOCAL_BUILD= $(SYMROOT)
35
36 CFLAGS= -g $(HDR_INCPATH) -DVDADER_RULES
37 LDFLAGS= -lstdc++ -lsnacc++ -L$(LOCAL_BUILD)
38
39 CC= /usr/bin/cc
40 SNACC= /usr/local/bin/snacc
41 SNACC_FLAGS= -C -D -u $(ASN_USEFUL)
42
43 first: $(GEN_SRC) move_genfiles
44
45 $(GEN_SRC): $(ASN1_SRC)
46 (cd $(ASN_SRC_DIR); $(SNACC) $(SNACC_FLAGS) $(ASN1_SRC))
47
48 move_genfiles: clean_genfiles
49 (cd $(ASN_SRC_DIR); \
50 mv *.cpp $(GEN_SRC_DIR); \
51 mv *.h $(GEN_HDR_DIR))
52
53 clean_genfiles:
54 (cd $(GEN_SRC_DIR); rm -f *.cpp)
55 (cd $(GEN_HDR_DIR); rm -f *.h)
56
57 clean: clean_genfiles
58
59 install:
60
61 # anything else?
62
63