home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / pax / 1 / Makefile < prev    next >
Encoding:
Makefile  |  1989-01-07  |  3.2 KB  |  121 lines

  1. #
  2. # PAX - read and write POSIX conformant tar and cpio archives 
  3. #
  4. # Written by Mark H. Colburn (mark@jhereg.mn.org)
  5. #
  6. # $Id: Makefile,v 1.1 88/12/23 18:02:42 mark Rel $
  7. #
  8.  
  9. #
  10. # CONFIGURATION SECTION
  11. #
  12. # The following defines may need to be changed for each system which PAX
  13. # is installed on.  Please review these settings before installing on your
  14. # system.
  15.  
  16. #
  17. # You should define _POSIX_SOURCE if you are running on a POSIX system.  This
  18. # include has to be in the command line because it has to appear before any
  19. # include file is included in the source.  For most systems in use today,
  20. # it should be left blank.
  21. # POSIX= -D_POSIX_SOURCE
  22. POSIX= 
  23.  
  24. #
  25. # Set CFLAGS to whatever makes your C compiler happy.  Be sure to include 
  26. # the definition of $(POSIX) in the flag.
  27. #
  28. CFLAGS = -O $(POSIX)
  29. CC = cc
  30.  
  31. #
  32. # Set LFLAGS to whatever makes your linker happy
  33. #
  34. #LDFLAGS = -s
  35. LDFLAGS = 
  36.  
  37. #
  38. # Set LINTFLAGS to whatever makes your implementation of lint happy.  If
  39. # you don't undef __STDC__ and you have an ANSI C compiler, lint will choke 
  40. # on the function prototypes present in func.h
  41. #
  42. LINTFLAGS = -U__STDC__ $(POSIX)
  43.  
  44. #
  45. # BINDIR - points to the directory in which you want the final pax, tar and
  46. # cpio binaries installed in.
  47. #
  48. BINDIR = /usr/local/bin
  49.  
  50. #
  51. # MANDIR - specify the directory in which the man pages will be installed
  52. #
  53. MAN5 = /usr/man/man5
  54. MAN1 = /usr/man/man1
  55.  
  56. #
  57. # There are three different ways to get POSIX or BSD conformant directory 
  58. # access routines: 1) they are installed in your system library, 2) you 
  59. # are using Doug Gwyn's dirent library (/usr/lib/libdirent.a), or 3) you 
  60. # need the source for the dirent package.  Based on that, pick one of the 
  61. # following three options:
  62. #
  63. # 1. Pick the first dirent line and make sure that config.h is defined
  64. #    correctly for your version of directory access routines.  THIS IS
  65. #    THE LINE WHICH SHOULD BE USED FOR BSD SYSTEMS.
  66. # 2. Chose the second dirent line which  used a library at link time.  You
  67. #    may need to change the name of the library to match your system.
  68. # 3. If you need #3, then you must copy everything in the subdirectory dirent 
  69. #    to this directory and choose the DIROBJ lines.  Please note that this 
  70. #    version of dirent has been modified to work as a stand-alone. 
  71. #
  72. DIRENT=
  73. #DIRENT= -ldirent
  74. #DIROBJ= paxdir.o
  75.  
  76. #
  77. # END CONFIGURATION SECTION 
  78. #
  79. # Nothing beyond this point should need to be changed.
  80. #
  81.  
  82. MISC   = Makefile pax.1 tar.5 cpio.5 README PATCHLEVEL
  83. HEADERS= config.h func.h limits.h port.h pax.h 
  84. SOURCE= pax.c append.c buffer.c cpio.c create.c extract.c fileio.c\
  85.     link.c list.c mem.c namelist.c names.c pass.c pathname.c\
  86.     port.c regexp.c replace.c tar.c ttyio.c warn.c wildmat.c
  87. OBJECT= pax.o append.o buffer.o cpio.o create.o extract.o fileio.o\
  88.     link.o list.o mem.o namelist.o names.o pass.o pathname.o\
  89.     port.o regexp.o replace.o tar.o ttyio.o warn.o wildmat.o $(DIROBJ)
  90. PROGS = pax tar cpio
  91. PMAN1 = pax.1 tar.1
  92. PMAN5 = pax.5 tar.5
  93.  
  94. all: $(PROGS)
  95.  
  96. install: $(PROGS)
  97.     mv $(PROGS) $(BINDIR)
  98.     cp $(PMAN1) $(MAN1)
  99. #    cp $(PMAN5) $(MAN5)
  100.  
  101. clean:
  102.     rm -f $(OBJECT)
  103.     rm -f $(PROGS) a.out *.BAK *.bak 
  104.  
  105. lint:
  106.     lint $(LINTFLAGS) $(SOURCE)
  107.  
  108. pax : $(OBJECT)
  109.     $(CC) $(CFLAGS) -o pax $(OBJECT) $(DIRENT) 
  110.  
  111. tar: pax
  112.     rm -f tar
  113.     ln pax tar
  114.  
  115. cpio: pax
  116.     rm -f cpio
  117.     ln pax cpio
  118.  
  119. $(OBJECT): $(HEADERS)
  120.