"Fossies" - the Fresh Open Source Software Archive

Member "afio-2.5.2/Makefile" (30 Nov 2018, 4129 Bytes) of package /linux/misc/afio-2.5.2.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile": 2.5.1_vs_2.5.2.

    1 SHELL=/bin/sh
    2 ##
    3 ##  See the INSTALLATION file for quick installation instructions.
    4 ##
    5 ##  I wrote this Makefile, based on comments in the source.  -rich $alz.
    6 ##  Define INDEX to use index() in place of strchr() (v7, BSD).
    7 #1	= -UINDEX
    8 ##  Define MEMCPY when an efficient memcpy() exists (SysV).
    9 2	= -DMEMCPY
   10 ##  Define MKDIR when a mkdir() system call is present (4.2BSD, SysVr3).
   11 3	= -DMKDIR
   12 ##  Define NOVOID if your compiler doesn't like void casts.
   13 #4	= -UNOVOID
   14 ##  Define SYSTIME to use <sys/time.h> rather than <time.h> (4.2BSD).
   15 #5	= -USYSTIME
   16 ##  Define VOIDFIX to allow pointers to functions returning void (non-PCC).
   17 6	= -DVOIDFIX
   18 ##  Define CTC3B2 to support AT&T 3B2 streaming cartridge tape.
   19 #7	= -UCTC3B2
   20 ##  Define HAVEFCNTL if you have <fcntl.h>
   21 8	= -DHAVEFCNTL
   22 ##  Define MYTEMPNAM if you don't have tempnam()
   23 #a	= -UMYTEMPNAM
   24 ##  Define UNIXPC if you are on a 3b1, 7300, etc.
   25 ##	(problem is you can't write to a floppy from shared memory)
   26 #b	= -UUNIXPC
   27 ##  Define HAVEMEMCMP if you have memcmp otherwise assumes bcmp
   28 c	= -DHAVEMEMCMP
   29 ##  Define DEFFMTCMD to being how to format the media you use the most
   30 ##		This is the DEFault FoRMat CoManD.
   31 d	= -DDEFFMTCMD='"fdformat /dev/fd0H1440"'
   32 ##  Define LONGZFILE if you want .Z to be tagged on the end of a 14 char
   33 ##	file name (or longer for BSD) in the archive when the file is compressed
   34 #e	= -DLONGZFILE
   35 
   36 ##  Define HAVE_LCHOWN is the system has an lchown call (like chown but does
   37 ##  not follow symlinks)
   38 e2      = -DHAVE_LCHOWN
   39 
   40 ##  Define PRG_COMPRESS to get something other than `gzip'.
   41 # you need to edit compfile.c (-G option) if you change this line.
   42 f	= -DPRG_COMPRESS='"gzip"'
   43 
   44 ## Define HAVEFNMATCH if you want to use the gnu fnmatch() routine for
   45 # -y -Y -w -W matching.
   46 # If it is not defined, a primitive replacement match routine is used that
   47 # only supports patterns of the form "cccc" and "cccc*".  Make sure that
   48 # you change the manual page in this case.
   49 
   50 g	= -DHAVEFNMATCH
   51 
   52 # fnmatch() is in the gnu C library, so it is directly available on
   53 # Linux.  If your system (e.g. SCO) does not have the gnu C library,
   54 # unpack the archive gnu.fnmatch.tar.gz and uncomment the following
   55 # two lines:
   56 
   57 #M	 = fnmatch.o
   58 #I	 = -I.
   59 
   60 # Please read the COPYING.LIB file in this archive if you plan to
   61 # redistribute afio executables with this library linked in.
   62 
   63 #uncomment one of the two lines below to
   64 #get the normal or large file compile environment
   65 # afio will work when compiled in both environments, but on old or non-linux
   66 # systems the large file compile environment itself might be buggy or beta.
   67 #LARGEFILEFLAGS=
   68 LARGEFILEFLAGS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
   69 
   70 # even more warnings flags..
   71 MW=-Wformat -Werror=format-security -Wall
   72 
   73 #the set of warning flags below can be uncommented to get lots of places where
   74 #code can be reviewed manually
   75 #MW=-Wtraditional -Wcast-qual -Wcast-align -Wconversion -pedantic -Wlong-long -Wimplicit -Wuninitialized -W -Wshadow -Wsign-compare -Wstrict-prototypes -Wmissing-declarations
   76 
   77 CFLAGS1 = -Wall -Wstrict-prototypes -s -O2 -fomit-frame-pointer -Wno-unused-result $(LARGEFILEFLAGS) $(MW)
   78 
   79 CC=gcc
   80 
   81 # also using contents of usin CPPFLAGS, CFLAGS, LDFLAGS out of environment
   82 # variables, if they exist
   83 CFLAGS += $(CFLAGS1) $1 $2 $3 $4 $5 $6 $7 $8 $9 $a $b $c $d $e $(e2) $f $g $I
   84 LDFLAGS +=
   85 CPPFLAGS +=
   86 
   87 afio : afio.o compfile.o exten.o match.o $M
   88 	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
   89 	afio.o compfile.o exten.o match.o $M -o afio
   90 
   91 clean:
   92 	rm -f *.o afio
   93 	rm -f regtest/cmpstat regtest/makesparse
   94 	rm -f regtest/statsize regtest/statsize64
   95 	cd regtest; /bin/sh regtest.clean
   96 
   97 install: afio
   98 	cp afio /usr/local/bin
   99 	cp afio.1 /usr/share/man/man1
  100 
  101 # generate default list of -E extensions from manpage
  102 # note: on sun, I had to change awk command below to nawk or gawk
  103 # to get it to work.
  104 exten_default.h : afio.1
  105 		awk -f exten_make.awk afio.1 >exten_default.h
  106 
  107 
  108 afio.o : afio.h patchlevel.h
  109 compfile.o : afio.h
  110 exten.o : afio.h exten_default.h
  111 match.o : afio.h
  112 
  113 regtest: regtestx
  114 
  115 regtestx: afio
  116 	cd regtest; make; rm cmpstat
  117 
  118 regtest2gb: regtest2gbx
  119 
  120 regtest2gbx: afio
  121 	cd regtest; make 2gb