Old Makefile
  1 SHELL=/bin/sh
  2 ##
  3 ##  I wrote this Makefile, based on comments in the source.  -rich $alz.
  4 ##  Define INDEX to use index() in place of strchr() (v7, BSD).
  5 #1      = -UINDEX
  6 ##  Define MEMCPY when an efficient memcpy() exists (SysV).
  7 2       = -DMEMCPY
  8 ##  Define MKDIR when a mkdir() system call is present (4.2BSD, SysVr3).
  9 3       = -DMKDIR
 10 ##  Define NOVOID if your compiler doesn't like void casts.
 11 #4      = -UNOVOID
 12 ##  Define SYSTIME to use <sys/time.h> rather than <time.h> (4.2BSD).
 13 #5      = -USYSTIME
 14 ##  Define VOIDFIX to allow pointers to functions returning void (non-PCC).
 15 6       = -DVOIDFIX
 16 ##  Define CTC3B2 to support AT&T 3B2 streaming cartridge tape.
 17 #7      = -UCTC3B2
 18 ##  Define HAVEFCNTL if you have <fcntl.h>
 19 8       = -DHAVEFCNTL
 20 ##  Define MYTEMPNAM if you don't have tempnam()
 21 #a      = -UMYTEMPNAM
 22 ##  Define UNIXPC if you are on a 3b1, 7300, etc.
 23 ##      (problem is you can't write to a floppy from shared memory)
 24 #b      = -UUNIXPC
 25 ##  Define HAVEMEMCMP if you have memcmp otherwise assumes bcmp
 26 c       = -DHAVEMEMCMP
 27 ##  Define DEFFMTCMD to being how to format the media you use the most
 28 ##              This is the DEFault FoRMat CoManD. 
 29 d       = -DDEFFMTCMD='"fdformat /dev/fd0H1440"'
 30 ##  Define LONGZFILE if you want .Z to be tagged on the end of a 14 char
 31 ##      file name (or longer for BSD) in the archive when the file is compressed
 32 #e      = -DLONGZFILE
 33 
 34 ##  Define PRG_COMPRESS to get something other than `gzip'.
 35 # you need to edit compfile.c (-G option) if you change this line.
 36 f       = -DPRG_COMPRESS='"gzip"'
 37 
 38 ## Define HAVEFNMATCH if you want to use the gnu fnmatch() routine for
 39 # -y -Y -w -W matching.
 40 # If it is not defined, a primitive replacement match routine is used that
 41 # only supports patterns of the form "cccc" and "cccc*".  Make sure that
 42 # you change the manual page in this case.
 43 
 44 g       = -DHAVEFNMATCH
 45 
 46 # fnmatch() is in the gnu C library, so it is directly available on
 47 # Linux.  If your system (e.g. SCO) does not have the gnu C library,
 48 # unpack the archive gnu.fnmatch.tar.gz and uncomment the following
 49 # two lines:
 50 
 51 #M       = fnmatch.o
 52 #I       = -I.
 53 
 54 # Please read the COPYING.LIB file in this archive if you plan to
 55 # redistribute afio executables with this library linked in.
 56 
 57 #CFLAGS1 = -ggdb
 58 #CFLAGS1 = -Wall -s -g -O2 -fomit-frame-pointer
 59 CFLAGS1 = -Wall -O2 -fomit-frame-pointer
 60 
 61 
 62 CC=gcc
 63 
 64 
 65 CFLAGS = ${CFLAGS1} $1 $2 $3 $4 $5 $6 $7 $8 $9 $a $b $c $d $e $f $g $I
 66 LDFLAGS =
 67 
 68 afio : afio.o compfile.o exten.o match.o $M
 69         ${CC} ${LDFLAGS} afio.o compfile.o exten.o match.o $M -o afio
 70 
 71 clean:
 72         rm -f *.o afio
 73 
 74 install: afio
 75         cp afio /usr/bin
 76         cp afio.1 /usr/man/man1
 77 
 78 
 79 afio.o : afio.h patchlevel.h
 80 compfile.o : afio.h
 81 exten.o : afio.h
 82 match.o : afio.h
 83