dnl dnl The following is obligatory ... skip it if you're trying to get dnl some real work done. If you're a lawyer, though, reading it IS dnl real work, so have fun (and don't be too rude, please ... it's a dnl layman's approximation to whatever Latin incantation says the same dnl thing!) dnl dnl Copyright notice. dnl This software is copyrighted (c) 1991 by Matt Bishop and the dnl Trustees of Dartmouth College. All rights reserved. dnl dnl Author: Matt Bishop dnl Address: Department of Mathematics and Computer Science dnl Dartmouth College dnl Hanover, NH 03755-1831 dnl USA dnl telephone: +1 603 646 3267 dnl fax: +1 603 646 1312 dnl internet: Matt.Bishop@dartmouth.edu dnl usenet: ...!decvax!dartvax!Matt.Bishop dnl define(FileVersion,`Version GAMMA 6/31/91 Matt.Bishop@dartmouth.edu') dnl SERIOUS PROBLEM with m4 -- you cannot rename a built-in macro dnl so whenever you want to put the word "include" in this file, dnl you MUST put "Inc" instead. If you want to use "Inc" for dnl something else, change the "Inc" in the next line. define(`Inc',``include'') dnl ******************** BEGIN MAKING CHANGES HERE ******************** dnl define the host type of the system; look in lib/include for dnl which names are known (they are the names of the files without dnl the trailing .h) -- NOTE WELL: DO NOT PUT ANY SPACES AROUND THE dnl NAME HERE OR YOU MAY GET BIT BY COMPILER BUGS since the Makefile dnl templates will override the defaults when necessary based on dnl mahine type define(HostType,sparc1) dnl define the operating system type here; currently supported are dnl 4.? BSD based systems (BSD4) and System V based systems (SYSV) define(OSType,BSD4) dnl define the version of the DES library that you want to use; currently dnl supported are des32 (32 bit architecture), des64 (64 bit architecture) dnl and descrayC (vectorized C implementation for the Cray) define(Version,des32) dnl the timing (and testing) routines use the system encryption and dnl password hashing functions (so you can normalize the results of the dnl faster routines) but these are not always in the usual place, or even dnl accessible; for example, international versions don't have them in dnl place, and many vendors put them in libraries other than the standard dnl C library. Define the location of your standard crypt library here; dnl if you do not have one, you may either use the one in lib/testing dnl (in which case, set it to the full path name of that file), or you dnl may use none (in which case set it to none, that is, the string none). dnl If your library is in the usual place, just leave it blank. define(CryptLib,) dnl These deal with where the sources and executables are. The first set dnl (the names beginning with "Dest") is where the compiled libraries, dnl include files, and executables go. The second is where the sources dnl used to compile them are. With respect to the first, you may want to dnl change all (in particular, to keep the guesser dnl OUT of the public dnl bin directories -- hint, hint). The sources, though, are pretty much dnl fixed in location with respect to their top (or root). Change at your dnl own peril! dnl ----- note: directories named "include" must be listed as "`Inc'" dnl ----- (yes, you need the `') or m4 will clobber their name. define(DestRoot,/u/wk/mab/testg) define(DestPublicBin,DestRoot/bin) define(DestPrivateBin,DestRoot/adm) define(DestInclude,DestRoot/`Inc') define(DestLibrary,DestRoot/lib) define(SourceRoot,/u/wk/mab/guesser) dnl Define the compiler and preprocessor you want here. As different dnl compilers (and preprocessors) have different options, also set those dnl here. A set of defaults for the GNU compiler are given; these seem dnl to work well. The -O option is given for the C compiler below (see dnl C_OPTS) so you do not need to set it here. When needed, the -P option dnl to the C preprocessor is given in the Makefile rules, so don't worry dnl about that here either. dnl define(CCompiler,cc) dnl define(CPreprocessor,/lib/cpp) dnl define(CCompilerOptions,-temp=.) dnl define(CPreprocessorOptions,) define(CCompiler,gcc) define(CPreprocessor,/lib/cpp) define(CCompilerOptions,-ansi -fstrength-reduce -fcombine-regs -finline-functions -fdelayed-branch) define(CPreprocessorOptions,) dnl Some of the routines need to fill more than one contiguous location dnl of memory with zeroes. Some systems supply a library routine to dnl do this more quickly than an iterative loop. This routine is dnl usually called bzero(3) on BSD-based systems or memzero(3) on System V dnl based systems. If you want to force it to use a specific routine, set dnl ZeroMemory to the name of that routine. If you want to turn off the dnl use of this routine, set ZeroMemory to "none". If you make the dnl definition blank, the configuration program will try to determine dnl whether this routine exists by doing an nm(1) on the standard C library, dnl and grep(1)'ing first for bzero; if that is not found, it repeats the dnl procedure looking for memzero. If neither routine is there, it dnl assumes no such routine exists. The second define here is the location dnl of the standard C library; again, change it as needed. define(ZeroMemory,) define(CLibrary,/lib/libc.a) dnl The program to create a configuration file requires knowledge of dnl the word size. This is USUALLY "unsigned long", but some systems dnl (most notably the Convex using 64 bit mode) define another type, dnl usually something like "unsigned long long". If your host falls dnl into that class, make the change here; it will propagate to the dnl configuration program when you compile it. You also need to say dnl how this is carried over into constants, particularly what to dnl append to constants to get the appropriate width (ie, L, LL, etc.) dnl and how to print these large numbers (ie, using the format 0x%lxL, dnl 0x%llxLL, or whatever -- note the trailing symbol to ensure that dnl the printed constants can be compiled correctly; IF YOU OMIT THIS, dnl THE LIBRARIES MAY NOT WORK) define(Word,unsigned long) define(SuffixWord,L) define(PrintWord,0x%lx) dnl ******************** END MAKING CHANGES HERE ******************** dnl dnl The rest of this is intended for Makefiles. But if the above goes dnl into a C program, the preprocessor will go absolutely ape at the dnl Makefile comments (lots of "unrecognized keyword" error messages). dnl We can't just indent the Makefile comments; Make won't mind, and dnl while older preprocessors would be happy, ANSI C ones look at the dnl first NONBLANK character on the line (not the first character on dnl the line!). So, in C programs, we define IsCProgram before the dnl include line, and below this, we redefine #. We reset it at the end. dnl ifelse(IsCProgram,yes,,`define(Comment,`#')') Comment directory tree -- destination DESTTOP = DestRoot DESTLIB = DestLibrary DESTINC = DestInclude DESTBIN = DestPublicBin DESTADM = DestPrivateBin Comment directory tree -- source TOP = SourceRoot Comment include for library LIBTOP = $(TOP)/lib LIBINC = $(LIBTOP)/Inc LIBTST = $(LIBTOP)/testing Comment Comment some system files you may need Comment if the system password encryption function is not in the Comment usual C library, put it here STDCRYPTLIB = ifelse(CryptLib,none,,CryptLib) Comment if the usual library is not available, change the "U" to a "D" STDCRYPTDEF = ifelse(CryptLib,none,-DNOSTDCRYPT,-UNOSTDCRYPT) Comment version: which version of deszip do you want VERSION = Version Comment system type: what is the font of your system? SYSTYPE = OSType Comment host type: it must match a file name in LIBINC, without the .h HOSTTYPE = HostType dnl dnl Now we clean up by deleting the special meaning for "inc" undefine(`Inc') Comment Comment useful programs Comment AR_MAKE = ar rcvl # create a library archive CC = CCompiler # C compiler CHMOD = chmod # change protection mode CP = cp # copy a file CPP = CPreprocessor # C preprocessor ECHO = echo # print arguments LORDER = lorder # order for the loader M4 = m4 # macro preprocessor MV = mv # move a file RANLIB = ifelse(OSType,BSD4,ranlib,true) # generate a table of contents RM = rm # delete a file SED = sed # stream editor Comment # shell program -- give FULL PATH NAME HERE Comment # this must be on a separate line or subcommands Comment # break since make tries to exec the blank space SHELL = /bin/sh TOUCH = touch TSORT = tsort # topological sort Comment Comment relevant options Comment C_OPTS = -D$(SYSTYPE) -O CCompilerOptions # compiler flags CPP_OPTS = -D$(SYSTYPE) CPreprocessorOptions # preprocessor flags CHMOD_RWEOEA = 711 # change file mode to rwx--x--x RM_FORCE = -f # delete file without any questions SED_RE = -e # sed: next argument is an ed-style reg exp dnl dnl this cleans up the rest of the include file for makefiles dnl it resets the `' quotes to %% and undefines include dnl otherwise, things like dnl ar rcv libx.a `tsort x.o y.o z.o` dnl or dependencies like dnl x.o: ../include/x.h dnl are messed up ROYALLY!!! dnl undefine(`include') changequote(,)