1 # file: .../tbl-example/makefile
3 # $Header: /cvs/Darwin/Security/SecuritySNACCRuntime/tbl-example/makefile,v 1.1.1.1 2001/05/18 23:14:10 mb Exp $
5 # Revision 1.1.1.1 2001/05/18 23:14:10 mb
6 # Move from private repository to open source repository
8 # Revision 1.1.1.1 1999/03/16 18:06:53 aram
9 # Originals from SMIME Free Library.
11 # Revision 1.1 1997/02/15 19:33:26 rj
19 ASN1_SRC_DIR = $(TOP)/asn1specs
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
25 COMPILERDIR = $(TOP)/compiler
26 SNACC = $(COMPILERDIR)/snacc
27 USEFUL_TYPES = $(ASN1_SRC_DIR)/asn-useful.asn1
28 SNACCFLAGS = -u $(USEFUL_TYPES)
30 TBLTOOLSDIR = $(TOP)/tbl-tools
31 MKHDR = $(TBLTOOLSDIR)/mkchdr/mkchdr
33 ASN1FILES = $(ASN1_SRC_DIR)/p-rec.asn1
46 CPPFLAGS += -I$(TOP) -I$(ASN1_C_INC_DIR) -DUSE_GEN_BUF
48 #-------------------------------------------------------------------------------
52 example: $(OFILES) $(TTBL_ASN1_LIB)
54 $(CC) $(CFLAGS) -o example $(OFILES) $(TTBL_ASN1_LIB) $(LIBS)
56 $(ASN1TTFILE): $(ASN1FILES)
58 $(SNACC) $(SNACCFLAGS) -T $@ $(ASN1FILES)
61 cd $(@D) && $(MAKE) $(@F)
64 cd $(@D) && $(MAKE) tbl-lib
66 $(ASN1TTHFILE): $(ASN1TTFILE)
70 check:: example $(ASN1TTFILE)
73 ./example p-rec.tt p-rec.ber
74 cmp p-rec.ber p-rec.out.ber
75 @echo "+++ the test was successful"
81 $(RM) example *.o *~ core .emacs* $(ASN1TTFILE) $(ASN1TTHFILE) p-rec.out.ber
86 depend:: $(ASN1TTHFILE)