home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / cpio-2.3-src.lha / src / amiga / cpio-2.3 / Makefile.in < prev    next >
Makefile  |  1994-02-23  |  6KB  |  175 lines

  1. # Makefile for GNU cpio.
  2. # Copyright (C) 1988, 1991 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. # If you use gcc, you should either run the fixincludes script that
  24. # comes with it or else use gcc with the -traditional option.  Otherwise
  25. # ioctl calls will be compiled incorrectly on some systems.
  26. CC = @CC@
  27.  
  28. # If you don't have a BSD or GNU install program, use cp.
  29. INSTALL = @INSTALL@
  30. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  31. INSTALL_DATA = @INSTALL_DATA@
  32.  
  33. # Things you might add to DEFS:
  34. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  35. # -DHAVE_UNISTD_H    If you have unistd.h.
  36. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  37. # -DHAVE_UTIME_H    If you have utime.h.
  38. # -DMAJOR_IN_MKDEV    If major, minor, makedev defined in sys/mkdev.h.
  39. # -DMAJOR_IN_SYSMACROS    If major, minor, makedev defined in sys/sysmacros.h.
  40. # -DHAVE_FCNTL_H    If not POSIX.1 but you have fcntl.h.
  41. # -DRETSIGTYPE=int    If your signal handlers return int, not void.
  42. # -DHAVE_LCHOWN        If you have lchown system call.
  43. # -DHAVE_STRERROR    If you have strerror function.
  44. # -DHAVE_VPRINTF    If you have vprintf function.
  45. # -DHAVE_DOPRNT        If you have _doprnt function (but lack vprintf).
  46. # -DHAVE_SYS_MTIO_H    If you have sys/mtio.h (magtape ioctls).
  47. # -DHAVE_SYS_GENTAPE_H    If you have sys/gentape.h (ISC magtape ioctls).
  48. # -DHAVE_NETDB_H    To use rexec for remote tape operations
  49. #            instead of forking rsh or remsh.
  50. # -DNO_REMOTE        If you have neither a remote shell nor rexec.
  51. # -DSYMLINK_USES_UMASK    If your symlink system call uses the value of
  52. #            umask to set the protection of symbolic links.
  53. # -DHPUX_CDF        If you are on an HP/UX system and want support
  54. #            for context dependent files.
  55.  
  56. DEFS = @DEFS@
  57. LIBS = @LIBS@
  58. # Set this to rtapelib.o unless you defined NO_REMOTE, in which case
  59. # make it empty.
  60. RTAPELIB = @RTAPELIB@
  61.  
  62. CFLAGS = -O2
  63. LDFLAGS =
  64.  
  65. prefix = /gnu
  66. exec_prefix = $(prefix)
  67.  
  68. # Prefix for each installed program, normally empty or `g'.
  69. binprefix = 
  70. # Prefix for each installed man page, normally empty or `g'.
  71. manprefix = 
  72.  
  73. # Where to install the cpio and mt executables.
  74. bindir = $(exec_prefix)/bin
  75.  
  76. # Where to put the rmt executable.
  77. libdir = /gnu/etc
  78.  
  79. # Where to put the Unix-style manual pages.
  80. mandir = $(prefix)/man/man1
  81. # Extension (not including `.') for the Unix-style manual page filenames.
  82. manext = 1
  83.  
  84. #### End of system configuration section. ####
  85.  
  86. SHELL = /bin/sh
  87.  
  88. SRCS = copyin.c copyout.c copypass.c defer.c dstring.c fnmatch.c global.c \
  89. main.c tar.c util.c error.c getopt.c getopt1.c filemode.c version.c \
  90. rtapelib.c dirname.c idcache.c makepath.c xmalloc.c stripslash.c \
  91. userspec.c xstrdup.c bcopy.c mkdir.c strdup.c
  92. OBJS = copyin.o copyout.o copypass.o defer.o dstring.o global.o \
  93. main.o tar.o util.o error.o getopt.o getopt1.o filemode.o version.o \
  94. $(RTAPELIB) dirname.o idcache.o makepath.o xmalloc.o stripslash.o \
  95. userspec.o xstrdup.o @LIBOBJS@ @ALLOCA@ 
  96. # mt source files not shared with cpio.
  97. MT_SRCS = mt.c argmatch.c
  98. MT_OBJS = mt.o argmatch.o error.o getopt.o getopt1.o \
  99. xmalloc.o version.o $(RTAPELIB) @ALLOCA@
  100. HDRS = cpio.h cpiohdr.h tar.h tarhdr.h defer.h dstring.h extern.h filetypes.h \
  101. system.h fnmatch.h getopt.h rmt.h 
  102. DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in \
  103. README NEWS INSTALL cpio.1 mt.1 makefile.pc makefile.os2 cpio.def \
  104. configure configure.in mkinstalldirs $(MT_SRCS) rmt.c tcexparg.c alloca.c
  105.  
  106. all:    @PROGS@
  107.  
  108. .c.o:
  109.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) $<
  110.  
  111. install: installdirs all $(srcdir)/cpio.1 $(srcdir)/mt.1
  112.     $(INSTALL_PROGRAM) cpio $(bindir)/$(binprefix)cpio
  113.     test ! -f mt || $(INSTALL_PROGRAM) mt $(bindir)/$(binprefix)mt
  114.     -test ! -f rmt || $(INSTALL_PROGRAM) rmt $(libdir)/rmt
  115.     -$(INSTALL_DATA) $(srcdir)/cpio.1 $(mandir)/$(manprefix)cpio.$(manext)
  116.     -test ! -f mt || $(INSTALL_DATA) $(srcdir)/mt.1 $(mandir)/$(manprefix)mt.$(manext)
  117. installdirs:
  118.     ${srcdir}/mkinstalldirs $(bindir) $(libdir) $(mandir)
  119.  
  120. uninstall:
  121.     cd $(bindir); rm -f $(binprefix)cpio $(binprefix)mt
  122.     -rm -f $(libdir)/rmt
  123.     cd $(mandir); rm -f $(manprefix)cpio.$(manext) $(manprefix)mt.$(manext)
  124.  
  125. check:
  126.     @echo No tests are supplied.
  127.  
  128. cpio:    $(OBJS)
  129.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  130.  
  131. copyin.o: cpio.h cpiohdr.h defer.h dstring.h extern.h filetypes.h fnmatch.h rmt.h system.h
  132. copyout.o: cpio.h cpiohdr.h defer.h dstring.h extern.h filetypes.h rmt.h system.h
  133. copypass.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h system.h
  134. defer.o: cpiohdr.h extern.h system.h
  135. dstring.o: dstring.h
  136. global.o: cpio.h cpiohdr.h dstring.h extern.h system.h
  137. main.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h rmt.h
  138. tar.o: filetypes.h cpio.h cpiohdr.h dstring.h extern.h rmt.h tar.h tarhdr.h system.h
  139. util.o: extern.h rmt.h system.h
  140. mt.o: rmt.h
  141.  
  142. rmt:    rmt.o
  143.     $(CC) $(LDFLAGS) -o $@ rmt.o $(LIBS)
  144.  
  145. mt:    $(MT_OBJS)
  146.     $(CC) $(LDFLAGS) -o $@ $(MT_OBJS) $(LIBS)
  147.  
  148. TAGS:    $(SRCS)
  149.     etags $(SRCS)
  150.  
  151. clean:
  152.     rm -f cpio rmt mt *.o core
  153.  
  154. mostlyclean: clean
  155.  
  156. distclean: clean
  157.     rm -f Makefile config.status
  158.  
  159. realclean: distclean
  160.     rm -f TAGS
  161.  
  162. dist: $(DISTFILES)
  163.     echo cpio-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  164.     rm -rf `cat .fname`
  165.     mkdir `cat .fname`
  166.     -ln $(DISTFILES) `cat .fname`
  167.     for file in $(DISTFILES); do \
  168.       test -r `cat .fname`/$$file || cp -p $$file `cat .fname`; \
  169.     done
  170.     tar chzf `cat .fname`.tar.gz `cat .fname`
  171.     rm -rf `cat .fname` .fname
  172.  
  173. # Prevent GNU make v3 from overflowing arg limit on SysV.
  174. .NOEXPORT:
  175.