3 # makes C++ ASN.1 runtime library
7 # $Header: /cvs/root/Security/SecuritySNACCRuntime/c++-lib/Attic/makefile,v 1.1.1.1 2001/05/18 23:14:05 mb Exp $
9 # Revision 1.1.1.1 2001/05/18 23:14:05 mb
10 # Move from private repository to open source repository
12 # Revision 1.3 2000/12/22 00:04:15 dmitch
13 # Misc. updates for clean build on Cheetah 1D7.
15 # Revision 1.2 2000/05/10 23:38:06 rmurphy
16 # Updating makefile and install related files
18 # Revision 1.1.1.1 1999/03/16 18:05:58 aram
19 # Originals from SMIME Free Library.
21 # Revision 1.12 1997/03/13 09:15:05 wan
22 # Improved dependency generation for stupid makedepends.
23 # Corrected PeekTag to peek into buffer only as far as necessary.
24 # Added installable error handler.
25 # Fixed small glitch in idl-code generator (Markku Savela <msa@msa.tte.vtt.fi>).
27 # Revision 1.11 1997/02/16 16:48:25 rj
28 # made return *this after calling abort()'' a compile time option.
30 # Revision 1.10 1997/02/15 20:40:26 rj
31 # clean/clobber simplified, no recursive call
33 # Revision 1.9 1995/09/07 18:44:09 rj
34 # snacced.[hC] renamed into tcl-if.[hC],
35 # tkXAppInit.c lost its X.
37 # asn-useful.asn1 is compiled with the -l 50 option, as recommended by MS in the documentation.
39 # Revision 1.8 1995/07/27 08:33:31 rj
40 # make $(TCL-P) if necessary.
42 # actions for stamp-useful rule: call diff only if both input files exist.
44 # Revision 1.7 1995/07/24 15:52:59 rj
45 # changed `_' to `-' in file names.
47 # useful.asn1 renamed to asn-useful.asn1 to accomodate to snacc's new file name generation scheme.
49 # make tcl interface as determined thru the $(TCL-P) utility prog.
51 # `cd && make' instead of `cd; make'.
53 # create installation directories only if they do not exist already.
55 # call make recursively to generate the libraries different dependencies and concatenate them.
57 # Revision 1.6 1995/02/20 11:40:24 rj
58 # remove stamp-useful before removing asn-useful.[hC].
59 # distribute install-sh.
60 # use $(INSTALL*) in a for-loop as some install programs (namely the distributed install-sh) only process their first argument!
62 # Revision 1.5 1995/02/09 14:03:22 rj
63 # enforce generation of inc/asn-useful.h and src/asn-useful.cpp when making dependencies
65 # Revision 1.4 1994/10/08 05:27:31 rj
66 # don't distribute the non-bootstrapping version of asn-useful.[hc]
68 # Revision 1.3 1994/10/08 04:03:19 rj
69 # a new asn-useful.[Ch] get generated every time the compiler or asn-useful.asn1 changes.
71 # the Tcl interface needs a separate library because conditional compilation and virtual tables don't match otherwise.
73 # Revision 1.2 1994/08/31 23:28:41 rj
74 # DISTFILES and install phony target added.
76 # Revision 1.1 1994/08/28 09:20:22 rj
77 # first check-in. for a list of changes to the snacc-1.1 distribution please refer to the ChangeLog.
81 include ../makehead.static
87 ASN1_SRC_DIR = $(TOP)/asn1specs
89 COMPILERDIR = $(TOP)/compiler
90 SNACC = $(COMPILERDIR)/snacc
91 USEFUL_TYPES = $(ASN1_SRC_DIR)/asn-useful.asn1
93 CPPFLAGS += -Iinc -I$(TOP) $(tcl_def) -F/System/Library/PrivateFrameworks
96 # hack around broken autoconf and missing makehead
98 RANLIB= /usr/bin/ranlib
102 #- # Base directory of snacc11
103 #- UserDir=/net/saturn/usr4/GLASS/tools
104 #- Snacc11Dir=$(UserDir)/snacc
106 #- # where ShmMgr is located
107 #- ShmMgrDir=/net/saturn/usr4/GLASS/tools/shmmgr
109 #- # Directories of the HeiTS
110 #- # needed to include *.h files and Libs.
111 #- HeiTSDir = /u/HeiTS
112 #- OSSDir = $(HeiTSDir)/oss
113 #- BMSDir = $(HeiTSDir)/bms
114 #- MEMDir = $(HeiTSDir)/memmgr
116 #- # my own .h files for OSS are located at
117 #- OwnOSSDir = $(UserDir)/include/HeiTS3.2.6/oss_aix
118 #- OwnMemMgrDir = $(UserDir)/include/HeiTS3.2.6/memmgr
120 #- # OSS include and define for compiling
122 #- HeiTSIncDirs = -I$(OwnOSSDir) -I$(OwnMemMgrDir) -D__AIX_32__ -D__AIX__
124 #- #HeiTSIncDirs = -I$(OwnOSSDir) -I$(OwnMemMgrDir) -D__ALL_SOURCE -D__AIX_32__ -DMMSERV -DDEBUG -DMAP_MANAGEMENT -DMHEG
126 #- LIB_HDR_DIR = $(Snacc11Dir)/cpp_incl
129 #- CFLAGS = -c -g -qchars=signed -+ -DIEEE_REAL_FMT -I$(LIB_HDR_DIR) -I$(ShmMgrDir) $(HeiTSIncDirs)
130 #- #endif /* _IBM_ENC_ */
222 #-------------------------------------------------------------------------------
224 default:: c++-lib tcl-lib
231 test -d $@ || mkdir $@
232 $(RM) $@/*.[Cc] $@/*.cpp
236 .PHONY: c++-lib tcl-lib
243 $(MAKE) d=c++ c++ ofiles lib tcl_def=-DMETA=0
248 if $(TCL-P); then $(MAKE) d=tcl tcl ofiles lib tcl_def=-DTCL; fi
251 libasn1tcl.a: $(OFILES)
258 src/asn-useful.cpp: stamp-useful
260 stamp-useful: $(SNACC) $(USEFUL_TYPES) $(TCL-P)
262 $(SNACC) -C $(SNACC_NOVOLAT) -l 50 -tcl "" $(USEFUL_TYPES);\
265 $(SNACC) -C $(SNACC_NOVOLAT) -l 50 $(USEFUL_TYPES);\
267 # the dates in the two files will differ, so the files really differ if diff prints more than 4 lines of output:
268 @if [ ! -f inc/asn-useful.h ] || [ `diff asn-useful.h inc/asn-useful.h | wc -l` -gt 4 ]; then\
269 mv asn-useful.h inc/asn-useful.h;\
271 echo "asn-useful.h hasn't changed";\
274 @if [ ! -f src/asn-useful.cpp ] || [ `diff asn-useful.cpp src/asn-useful.cpp | wc -l` -gt 4 ]; then\
275 mv asn-useful.cpp src/asn-useful.cpp;\
277 echo "asn-useful.cpp hasn't changed";\
278 $(RM) asn-useful.cpp;\
283 cd $(@D) && $(MAKE) $(@F)
286 ln $(TOP)/install-sh $@
288 $(incdir)/snacc/c++ $(libexecdir):
289 $(TOP)/mkinstalldirs $@
291 install:: $(HFILES) c++-lib tcl-lib install-sh $(incdir)/snacc/c++ $(libexecdir)
294 for h in $(HFILES) $(HFILES.shared); do $(INSTALL_DATA) $$h $(incdir)/snacc/c++/; done
295 for l in $(LIB); do $(INSTALL_DATA) $$l $(libexecdir)/; $(RANLIB) -t $(libexecdir)/$$l; done
296 if [ $d != tcl ]; then $(MAKE) LIB=libasn1tcl.a d=tcl $@; fi
300 $(RM) asn-useful.h inc/asn-useful.h
301 $(RM) asn-useful.cpp src/asn-useful.cpp
304 $(RM) *.o *~ .emacs* core
311 depend:: inc/asn-useful.h src/asn-useful.cpp
314 if [ x"$(DEPENDENCIES)" = x ]; then\
315 $(MAKE) d=c++ c++ DEPENDENCIES=deps.c++ depend;\
317 $(MAKE) d=tcl tcl tcl_def=-DTCL DEPENDENCIES=deps.tcl depend;\
319 cp /dev/null dependencies;\
320 for dir in c++ tcl; do\
321 < deps.$$dir sed -e "s/^src/$$dir/;s/^[a-z-]*\.o:/$$dir\/&/" >> dependencies;\