home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / arc / Archiver / cpio / src / Makefile.Amiga < prev    next >
Makefile  |  1992-09-19  |  5KB  |  158 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. # If you use gcc, you should either run the fixincludes script that
  21. # comes with it or else use gcc with the -traditional option.  Otherwise
  22. # ioctl calls will be compiled incorrectly on some systems.
  23. CC = gcc
  24.  
  25. # Things you might add to DEFS:
  26. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  27. # -DHAVE_UNISTD_H    If you have unistd.h.
  28. # -DHAVE_UTIME_H    If you have utime.h.
  29. # -DMAJOR_IN_MKDEV    If major, minor, makedev defined in sys/mkdev.h.
  30. # -DMAJOR_IN_SYSMACROS    If major, minor, makedev defined in sys/sysmacros.h.
  31. # -DRETSIGTYPE=int    If your signal handlers return int, not void.
  32. # -DUSG            If you have System V/ANSI C string
  33. #            and memory functions and headers.
  34. # -DHAVE_LCHOWN        If you have lchown system call.
  35. # -DHAVE_STRERROR    If you have strerror function.
  36. # -DHAVE_VPRINTF    If you have vprintf function.
  37. # -DHAVE_DOPRNT        If you have _doprnt function (but lack vprintf).
  38. # -DHAVE_SYS_MTIO_H    If you have sys/mtio.h (magtape ioctls).
  39. # -DHAVE_SYS_GENTAPE_H    If you have sys/gentape.h (ISC magtape ioctls).
  40. # -DHAVE_NETDB_H    To use rexec for remote tape operations
  41. #            instead of forking rsh or remsh.
  42. # -DNO_REMOTE        If you have neither a remote shell nor rexec.
  43.  
  44. DEFS = -DNO_REMOTE -DSTDC_HEADERS -DHAVE_UNISTD_H -DHAVE_UTIME_H 
  45. LIBS = 
  46. # Set this to rtapelib.o unless you defined NO_REMOTE, in which case
  47. # make it empty.
  48. RTAPELIB = 
  49.  
  50. CFLAGS = -g
  51. LDFLAGS = -g
  52.  
  53. prefix =
  54. srcdir = w:incoming/cpio-2.0
  55. exec_prefix = $(prefix)
  56.  
  57. # Prefix for each installed program, normally empty or `g'.
  58. binprefix = 
  59. # Prefix for each installed man page, normally empty or `g'.
  60. manprefix = 
  61.  
  62. # Where to install the cpio and mt executables.
  63. bindir = $(exec_prefix)/bin
  64.  
  65. # Where to put the rmt executable.
  66. libdir = /etc
  67.  
  68. # Where to put the Unix-style manual pages.
  69. mandir = $(prefix)/man/man1
  70. # Extension (not including `.') for the Unix-style manual page filenames.
  71. manext = 1
  72.  
  73. #### End of system configuration section. ####
  74.  
  75. SHELL = /bin/sh
  76.  
  77. SRCS = copyin.c copyout.c copypass.c dstring.c fnmatch.c global.c \
  78.        main.c tar.c util.c error.c getopt.c getopt1.c filemode.c version.c \
  79.        rtapelib.c dirname.c idcache.c makepath.c xmalloc.c stripslash.c \
  80.        userspec.c xstrdup.c bcopy.c mkdir.c strdup.c
  81. OBJS = copyin.o copyout.o copypass.o dstring.o fnmatch.o global.o \
  82.        main.o tar.o util.o error.o getopt.o getopt1.o filemode.o version.o \
  83.        $(RTAPELIB) dirname.o idcache.o makepath.o xmalloc.o stripslash.o \
  84.        userspec.o xstrdup.o 
  85. # mt source files not shared with cpio.
  86. MT_SRCS = mt.c argmatch.c
  87. MT_OBJS = mt.o argmatch.o error.o getopt.o getopt1.o \
  88.           xmalloc.o $(RTAPELIB) @ALLOCA@
  89. HDRS = cpio.h cpiohdr.h tar.h tarhdr.h dstring.h extern.h filetypes.h \
  90.        system.h fnmatch.h getopt.h rmt.h 
  91. DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in \
  92.             README NEWS INSTALL cpio.1 mt.1 makefile.pc makefile.os2 cpio.def \
  93.             configure configure.in $(MT_SRCS) rmt.c tcexparg.c alloca.c
  94.  
  95. all: cpio
  96.  
  97. .PHONY: all
  98.  
  99. .c.o:
  100.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) $<
  101.  
  102. install: all $(srcdir)/cpio.1 $(srcdir)/mt.1
  103.     $(INSTALL_PROGRAM) cpio $(bindir)/$(binprefix)cpio
  104.     test ! -f mt || $(INSTALL_PROGRAM) mt $(bindir)/$(binprefix)mt
  105.     -test ! -f rmt || $(INSTALL_PROGRAM) rmt $(libdir)/rmt
  106.     -$(INSTALL_DATA) $(srcdir)/cpio.1 $(mandir)/$(manprefix)cpio.$(manext)
  107.     -test ! -f mt || $(INSTALL_DATA) $(srcdir)/mt.1 $(mandir)/$(manprefix)mt.$(manext)
  108. .PHONY: install
  109.  
  110. cpio:    $(OBJS)
  111.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  112.  
  113. copyin.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h fnmatch.h rmt.h system.h
  114. copyout.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h rmt.h system.h
  115. copypass.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h system.h
  116. dstring.o: dstring.h
  117. global.o: cpio.h cpiohdr.h dstring.h extern.h system.h
  118. main.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h rmt.h
  119. tar.o: filetypes.h cpio.h cpiohdr.h dstring.h extern.h rmt.h tar.h tarhdr.h system.h
  120. util.o: extern.h rmt.h system.h
  121. mt.o: rmt.h
  122.  
  123. rmt:    rmt.o
  124.     $(CC) $(LDFLAGS) -o $@ rmt.o $(LIBS)
  125.  
  126. mt:    $(MT_OBJS)
  127.     $(CC) $(LDFLAGS) -o $@ $(MT_OBJS) $(LIBS)
  128.  
  129. TAGS:    $(SRCS)
  130.     etags $(SRCS)
  131.  
  132. clean:
  133.     rm -f cpio rmt mt *.o core
  134. .PHONY: clean
  135.  
  136. mostlyclean: clean
  137. .PHONY: mostlyclean
  138.  
  139. distclean: clean
  140.     rm -f Makefile config.status
  141. .PHONY: distclean
  142.  
  143. realclean: distclean
  144.     rm -f TAGS
  145. .PHONY: realclean
  146.  
  147. dist:
  148.     echo cpio-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  149.     rm -rf `cat .fname`
  150.     mkdir `cat .fname`
  151.     ln $(DISTFILES) `cat .fname`
  152.     tar chZf `cat .fname`.tar.Z `cat .fname`
  153.     rm -rf `cat .fname` .fname
  154. .PHONY: dist
  155.  
  156. # Prevent GNU make v3 from overflowing arg limit on SysV.
  157. .NOEXPORT:
  158.