home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd2.bin / dosutils / gtar109 / makefile.std < prev    next >
Makefile  |  1991-01-14  |  6KB  |  230 lines

  1. # Makefile for GNU tar program.
  2. # @(#)Makefile 1.30    87/11/11
  3.  
  4. # In addition to setting DEFS appropriately for your system, you might
  5. # have to hand edit the #defines and #undefs in port.c and rtape_lib.c.
  6. # For Ultrix 3.1, you will have to compile rtape_lib.c with -DUSG
  7. #
  8.  
  9. ## GNU version
  10. #DEFS = -DBSD42
  11. #LOCAL_SRC =
  12. #LOCAL_OBJ =
  13. #LDFLAGS =
  14. #LIBS =  -lutils
  15. #LINT = lint
  16. #LINTFLAGS = -abchx
  17. #DEF_AR_FILE = \"/dev/rmt8\"
  18. #DEFBLOCKING = 20
  19. #O = o
  20.  
  21. # Berserkeley version
  22. DEFS = -DBSD42
  23. LOCAL_SRC = getdate.y  rtape_lib.c
  24. LOCAL_OBJ = getdate.$O rtape_lib.$O
  25.  
  26. LDFLAGS =
  27. LIBS =
  28. LINT = lint
  29. LINTFLAGS = -abchx
  30. DEF_AR_FILE = \"/dev/rmt8\"
  31. DEFBLOCKING = 20
  32. O = o
  33.  
  34. # USG version
  35. # Add -DNDIR to DEFS if your system used ndir.h instead of dirent.h
  36. # Add -DDIRECT to DEFS if your system uses 'struct direct' instead of
  37. # 'struct dirent' (this is the case at least with one add-on ndir
  38. # library)
  39. # Add -lndir to LIBS if your ndir routines aren't in libc.a
  40. # Add -lPW to LIBS if you don't compile with gcc (to get alloca)
  41. #DEFS = -DUSG #-DNDIR -DDIRECT
  42. #LOCAL_SRC =  getdate.y rtape_lib.c
  43. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  44. #LDFLAGS =
  45. #LIBS = #-lndir -lPW
  46. #LINT = lint
  47. #LINTFLAGS = -p
  48. #DEF_AR_FILE = \"/dev/rmt8\"
  49. #DEFBLOCKING = 20
  50. #O = o
  51.  
  52. # UniSoft's Uniplus SVR2 with NFS
  53. #DEFS = -DUSG -DUNIPLUS -DNFS -DSVR2
  54. #LOCAL_SRC =  getdate.y rtape_lib.c
  55. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  56. #LDFLAGS =
  57. #LIBS = -lndir
  58. #LINT = lint
  59. #LINTFLAGS = -bx
  60. #DEF_AR_FILE = \"/dev/rmt8\"
  61. #DEFBLOCKING = 20
  62. #O = o
  63.  
  64. # MASSCOMP version
  65. #CC = ucb cc
  66. #DEFS = -DBSD42
  67. #LOCAL_SRC =  getdate.y rtape_lib.c
  68. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  69. #LDFLAGS =
  70. #LIBS =
  71. #LINT = lint
  72. #LINTFLAGS = -bx
  73. #DEF_AR_FILE = \"/dev/rmt0\"
  74. #DEFBLOCKING = 20
  75. #O = o
  76.  
  77. # (yuk) MS-DOS (Microsoft C 4.0) version
  78. #MODEL = S
  79. #DEFS = -DNONAMES -A$(MODEL) -DNO_REMOTE
  80. #LOCAL_SRC =  getdate.y rtape_lib.c
  81. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  82. #LDFLAGS =
  83. #LIBS = $(MODEL)dir.lib
  84. #LINT =    $(CC)
  85. #LINTFLAGS = -W3
  86. #DEF_AR_FILE = \"tar.out\"
  87. #DEFBLOCKING = 20
  88. #O = obj
  89.  
  90. # V7 version
  91. # Pick open3 emulation or nonexistence.  See open3.h, port.c.
  92. ##DEFS = -DV7 -DEMUL_OPEN3 -Dvoid=int
  93. ##DEFS = -DV7 -DNO_OPEN3 -Dvoid=int
  94. #LOCAL_SRC =  getdate.y rtape_lib.c
  95. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  96. #LDFLAGS =
  97. #LIBS = -lndir
  98. #LINT = lint
  99. #LINTFLAGS = -abchx
  100. #DEF_AR_FILE = \"/dev/rmt8\"
  101. #DEFBLOCKING = 20
  102. #O = o
  103.  
  104. # Minix version
  105. # No lint, so no lintflags.  Default file is stdin/out.  (Minix "tar"
  106. # doesn't even take an "f" flag, it assumes argv[2] is the archive name!)
  107. # Minix "make" doesn't expand macros right, so Minix users will have
  108. # to expand CFLAGS, SRCS, O, etc by hand, or fix your make.  Not my problem!
  109. # You'll also need to come up with ctime(), the directory
  110. # library, and a fixed doprintf() that handles %*s.  Put this stuff in
  111. # the "SUBSRC/SUBOBJ" macro below if you didn't put it in your C library.
  112. # Note that Minix "cc" produces ".s" files, not .o's, so O = s has been set.
  113. #
  114. # Pick open3 emulation or nonexistence.  See open3.h, port.c.
  115. ##DEFS = -DV7 -DMINIX -DEMUL_OPEN3
  116. ##DEFS = -DV7 -DMINIX -DNO_OPEN3
  117. #LOCAL_SRC =  getdate.y rtape_lib.c
  118. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  119. #LDFLAGS =
  120. #LIBS =
  121. #DEF_AR_FILE = \"-\"
  122. #DEFBLOCKING = 8    /* No good reason for this, change at will */
  123. #O = s
  124.  
  125. # Xenix version
  126. #DEFS = -DUSG -DXENIX
  127. #LOCAL_SRC =  getdate.y rtape_lib.c
  128. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  129. #LDFLAGS =
  130. #LIBS = -lx
  131. #LINT = lint
  132. #LINTFLAGS = -p
  133. #DEF_AR_FILE = \"/dev/rmt8\"
  134. #DEFBLOCKING = 20
  135. #O = o
  136.  
  137. # SGI 4D version
  138. #DEFS = -DUSG -I/usr/include/bsd
  139. #LOCAL_SRC = getdate.y rtape_lib.c
  140. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  141. #LDFLAGS =
  142. #LIBS =
  143. #LINT = lint
  144. #LINTFLAGS = -p
  145. #DEF_AR_FILE = \"/dev/tape\"
  146. #DEFBLOCKING = 20
  147. #O = o
  148.  
  149. #CC = gcc
  150. #TARGET_ARCH =
  151.  
  152. CFLAGS = $(COPTS) $(ALLDEFS)
  153. ALLDEFS = $(DEFS) \
  154.     -DDEF_AR_FILE=$(DEF_AR_FILE) \
  155.     -DDEFBLOCKING=$(DEFBLOCKING)
  156. # next line for Debugging
  157. COPTS = -g
  158. # next line for Production
  159. #COPTS = -O
  160.  
  161. # Add things here like readdir that aren't in your standard libraries.
  162. # (E.g. MSDOS needs msd_dir.c, msd_dir.obj)
  163. SUBSRC=
  164. SUBOBJ=
  165.  
  166. # Destination directory and installation program for make install
  167. DESTDIR = /usr/local
  168. INSTALL = cp
  169. RM = rm -f
  170.  
  171. SRC1 =    tar.c create.c extract.c buffer.c getoldopt.c update.c
  172. SRC2 =  version.c list.c names.c diffarch.c port.c wildmat.c getopt.c getopt1.c
  173. SRC3 =  $(LOCAL_SRC) $(SUBSRC)
  174. SRCS =    $(SRC1) $(SRC2) $(SRC3)
  175. OBJ1 =    tar.$O create.$O extract.$O buffer.$O getoldopt.$O list.$O update.$O
  176. OBJ2 =    version.$O names.$O diffarch.$O port.$O wildmat.$O getopt.$O getopt1.$O
  177. OBJ3 =  $(LOCAL_OBJ) $(SUBOBJ)
  178. OBJS =    $(OBJ1) $(OBJ2) $(OBJ3)
  179. # AUX =    README PORTING Makefile TODO tar.h port.h open3.h \
  180. #    msd_dir.h msd_dir.c
  181. AUX =   README COPYING ChangeLog Makefile tar.texinfo tar.h port.h open3.h \
  182.     rmt.h msd_dir.h msd_dir.c rtape_server.c rtape_lib.c getdate.y getopt.h
  183.  
  184. all:    tar rmt
  185.  
  186. tar:    $(OBJS)
  187.     $(CC) $(LDFLAGS) -o tar $(COPTS) $(OBJS) $(LIBS)
  188.  
  189. rmt:    rtape_server.c
  190.     $(CC) $(CFLAGS) -o rmt rtape_server.c
  191.  
  192. # command is too long for Messy-Dos (128 char line length limit) so
  193. # this kludge is used...
  194. #    @echo $(OBJ1) + > command
  195. #    @echo $(OBJ2) >> command
  196. #    link @command, $@,,$(LIBS) /NOI;
  197. #    @$(RM) command
  198.  
  199. install: all
  200.     $(RM) $(DESTDIR)/bin/tar
  201.     $(INSTALL) tar   $(DESTDIR)/bin/tar
  202.     $(INSTALL) tar.texinfo $(DESTDIR)/man/tar.texinfo
  203.     $(INSTALL) rmt /etc/rmt
  204.  
  205. lint:    $(SRCS)
  206.     $(LINT) $(LINTFLAGS) $(ALLDEFS) $(SRCS)
  207.  
  208. clean:
  209.     $(RM) errs $(OBJS) tar rmt
  210.  
  211. tar.shar.Z: $(SRCS) $(AUX)
  212.     shar $(SRCS) $(AUX) | compress > tar.shar.Z
  213.  
  214. dist: tar.tar tar.tar.Z
  215.  
  216. tar.tar: $(SRCS) $(AUX)
  217.     -rm -rf tar-dist
  218.     mkdir tar-dist
  219.     -ln $(AUX) $(SRCS) tar-dist
  220.     /bin/tar cf tar.tar tar-dist
  221.  
  222. tar.tar.Z: tar.tar
  223.     compress < tar.tar > tar.tar.Z
  224. #    /bin/tar cf - $(AUX) $(SRCS) | compress -v >tar.tar.Z
  225.  
  226. tar.zoo: $(SRCS) $(AUX)
  227.     zoo a tar $(AUX) $(SRCS)
  228.  
  229. $(OBJS): tar.h port.h
  230.