]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/tbl-example/makefile
Security-54.1.tar.gz
[apple/security.git] / SecuritySNACCRuntime / tbl-example / makefile
1 # file: .../tbl-example/makefile
2 #
3 # $Header: /cvs/Darwin/Security/SecuritySNACCRuntime/tbl-example/makefile,v 1.1.1.1 2001/05/18 23:14:10 mb Exp $
4 # $Log: makefile,v $
5 # Revision 1.1.1.1 2001/05/18 23:14:10 mb
6 # Move from private repository to open source repository
7 #
8 # Revision 1.1.1.1 1999/03/16 18:06:53 aram
9 # Originals from SMIME Free Library.
10 #
11 # Revision 1.1 1997/02/15 19:33:26 rj
12 # first check-in
13 #
14
15 include ../makehead
16
17 TOP = ..
18
19 ASN1_SRC_DIR = $(TOP)/asn1specs
20
21 ASN1_C_LIB_DIR = $(TOP)/c-lib
22 ASN1_C_INC_DIR = $(ASN1_C_LIB_DIR)/inc
23 TTBL_ASN1_LIB = $(ASN1_C_LIB_DIR)/libasn1ctbl.a
24
25 COMPILERDIR = $(TOP)/compiler
26 SNACC = $(COMPILERDIR)/snacc
27 USEFUL_TYPES = $(ASN1_SRC_DIR)/asn-useful.asn1
28 SNACCFLAGS = -u $(USEFUL_TYPES)
29
30 TBLTOOLSDIR = $(TOP)/tbl-tools
31 MKHDR = $(TBLTOOLSDIR)/mkchdr/mkchdr
32
33 ASN1FILES = $(ASN1_SRC_DIR)/p-rec.asn1
34 ASN1TTFILE = p-rec.tt
35 ASN1TTHFILE = p-rec.h
36
37 CFILES = example.c
38 OFILES = example.o
39
40 DISTFILES = \
41 README \
42 makefile \
43 $(CFILES) \
44 p-rec.ber
45
46 CPPFLAGS += -I$(TOP) -I$(ASN1_C_INC_DIR) -DUSE_GEN_BUF
47
48 #-------------------------------------------------------------------------------
49
50 all:: example
51
52 example: $(OFILES) $(TTBL_ASN1_LIB)
53 $(REASON)
54 $(CC) $(CFLAGS) -o example $(OFILES) $(TTBL_ASN1_LIB) $(LIBS)
55
56 $(ASN1TTFILE): $(ASN1FILES)
57 $(REASON)
58 $(SNACC) $(SNACCFLAGS) -T $@ $(ASN1FILES)
59
60 $(SNACC) $(MKHDR):
61 cd $(@D) && $(MAKE) $(@F)
62
63 $(TTBL_ASN1_LIB):
64 cd $(@D) && $(MAKE) tbl-lib
65
66 $(ASN1TTHFILE): $(ASN1TTFILE)
67 $(REASON)
68 $(MKHDR) $? $@
69
70 check:: example $(ASN1TTFILE)
71
72 check::
73 ./example p-rec.tt p-rec.ber
74 cmp p-rec.ber p-rec.out.ber
75 @echo "+++ the test was successful"
76
77 # dummy:
78 install::
79
80 clean::
81 $(RM) example *.o *~ core .emacs* $(ASN1TTFILE) $(ASN1TTHFILE) p-rec.out.ber
82
83 depend::
84 $(MAKE) $(MKHDR)
85
86 depend:: $(ASN1TTHFILE)
87
88 include ../maketail