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