2 # Makefile for the asnwish
4 # $Header: /cvs/Darwin/Security/SecuritySNACCRuntime/tcl-asn/makefile,v 1.1.1.1 2001/05/18 23:14:10 mb Exp $
6 # Revision 1.1.1.1 2001/05/18 23:14:10 mb
7 # Move from private repository to open source repository
9 # Revision 1.1.1.1 1999/03/16 18:06:54 aram
10 # Originals from SMIME Free Library.
12 # Revision 1.3 1997/10/10 13:43:18 wan
13 # Corrected bug in generic table decoder wrt. indefinite length elements
14 # Corrected compiler access to freed memory (bug reported by Markku Savela)
15 # Broke asnwish.c into two pieces so that one can build ones on wish
16 # Added beredit tool (based on asnwish, allowes to edit BER messages)
18 # Revision 1.2 1997/09/03 12:13:13 wan
19 # Reworked asnwish to neither strip nor encapsulate; instead,
20 # buffer reads during decoding incrementally Tcl_Read the channel.
22 # Revision 1.1 1997/08/27 15:55:51 wan
23 # Added generic table decoding, debug routines, berdecode, and asnwish.
31 SNACC = $(TOP)/compiler/snacc
33 ASN1_SRC_DIR = $(TOP)/asn1specs
35 ASN1INC = $(C_LIB)/inc
36 ASN1LIB = $(C_LIB)/libasn1ctbl.a
38 CPPFLAGS += -I$(TOP) -I$(ASN1INC) $(CPPFLAGS.TCL) $(CPPFLAGS.X11)
40 OFILES = tclasn.o asnwish.o
42 DISTFILES = makefile tclasn.c asnwish.c README beredit
44 LDFLAGS += $(LDFLAGS.X11)
45 LDLIBS += $(ASN1LIB) $(TCLLIBS) $(LDLIBS.X11pre) -lX11 $(LDLIBS.X11extra) $(LIBS)
49 #-------------------------------------------------------------------------------
53 $(WISH): $(OFILES) $(ASN1LIB)
55 $(CC) $(LDFLAGS) -o $(WISH) $(OFILES) $(LDLIBS)
58 cd $(@D) && $(MAKE) tbl-lib
60 # if $(ASN1INC)/asn_useful.h doesn't exist, someone probably called `make clean` in $(C++_LIB).
61 $(ASN1INC)/asn-useful.h:
65 cd $(@D) && $(MAKE) $(@F)
68 $(RM) $(ASN1HFILES) $(ASN1CFILES)
75 ln $(TOP)/install-sh $@
78 $(TOP)/mkinstalldirs $@
80 install:: $(WISH) install-sh $(bindir)
83 test -f dependencies || touch dependencies
86 $(INSTALL_PROGRAM) $(WISH) $(bindir)/
87 $(INSTALL_PROGRAM) beredit $(bindir)/
88 $(INSTALL_PROGRAM) tclasn.o $(libdir)/