home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / g / gtak212.zip / 1.10 / makefile.aix < prev    next >
Makefile  |  1992-09-18  |  10KB  |  341 lines

  1. ###############################################################################
  2. # $Id: makefile.aix,v 1.1 1992/09/18 08:59:06 ak Exp $
  3. ###############################################################################
  4. # $Log: makefile.aix,v $
  5. # Revision 1.1  1992/09/18  08:59:06  ak
  6. # Initial revision
  7. #
  8. # Revision 1.2  1992/09/02  20:09:35  ak
  9. # Version AK200
  10. # - Tape access
  11. # - Quick file access
  12. # - OS/2 extended attributes
  13. # - Some OS/2 fixes
  14. # - Some fixes of Kai Uwe Rommel
  15. #
  16. ###############################################################################
  17.  
  18. # Makefile for GNU tar program.
  19.  
  20. SHELL = /bin/sh
  21.  
  22. # In order to disable remote-tape support, add -DNO_REMOTE to the
  23. # appropriate DEFS line, and remove rtape_lb.* from LOCAL_{SRC,OBJ}
  24. # For Ultrix 3.1, you will have to compile rtape_lb.c with -DUSG.
  25. # Add -DUSE_REXEC to use rexec for remote tape operations
  26. # instead of forking rsh or remsh.
  27. #
  28. # If tar fails to properly print error msgs, or core-dumps doing same,
  29. # you may need to change which version of msg...() you are using.
  30. # To do so, add one of the following to your DEFS= line
  31. # -DSTDC_MSG        If you are using an ANSI compiler, and have vfprintf().
  32. # -DVARARGS_MSG        If you have varargs.h and vfprintf()
  33. # -DDOPRNT_MSG        If you have _doprnt(), and no useful varargs support
  34. # -DLOSING_MSG        If nothing else works.
  35. #
  36. # Some non-BSD systems may have to add -DNEED_TZSET in order to have getdate.y
  37. # compile correctly.
  38. #
  39. # If you have a system V system which defines size_t, add -DHAVE_SIZE_T.
  40. # If you have a system which defines strstr, add -DHAVE_STRSTR.
  41. #
  42. # If you can't use remote tar with the rmt library, you can still get
  43. # some stuff to work right by adding -DUSE_REXEC.
  44. #
  45. # Some people's systems define a prototype for signal handlers which
  46. # require them to be declared as void.  If you get such problems in
  47. # rtape_lb, function command, then define -DSIGNAL_VOID.  
  48. #
  49. # getdate.y has 8 shift/reduce conflicts.
  50. #
  51. # In addition to setting DEFS appropriately for your system, you might
  52. # have to hand edit the #defines and #undefs in port.c.
  53. #
  54.  
  55. ## GNU version
  56. #DEFS = -DBSD42
  57. #LOCAL_SRC = 
  58. #LOCAL_OBJ = 
  59. #LDFLAGS =
  60. #LIBS =  -lutils
  61. #LINT = lint
  62. #LINTFLAGS = -abchx
  63. #DEF_AR_FILE = \"-\"
  64. #DEFBLOCKING = 20
  65. #O = o
  66.  
  67. ## Berserkeley version
  68. #CC=gcc
  69. #DEFS = -DBSD42
  70. #LOCAL_SRC = getdate.y  rtape_lb.c
  71. #LOCAL_OBJ = getdate.$O rtape_lb.$O
  72. #LDFLAGS =
  73. #LIBS =
  74. #LINT = lint
  75. #LINTFLAGS = -abchx
  76. #DEF_AR_FILE = \"/dev/rmt8\"
  77. #DEFBLOCKING = 20
  78. #O = o
  79.  
  80. ## Ultrix
  81. #CC=gcc
  82. #DEFS = -DBSD42 -DSIGNAL_VOID
  83. #LOCAL_SRC = getdate.y  rtape_lb.c
  84. #LOCAL_OBJ = getdate.$O rtape_lb.$O
  85. #LDFLAGS =
  86. #LIBS =
  87. #LINT = lint
  88. #LINTFLAGS = -abchx
  89. #DEF_AR_FILE = \"/dev/rmt8\"
  90. #DEFBLOCKING = 20
  91. #O = o
  92.  
  93. # HPUX 7.0 version
  94. #DEFS = -DBSD42 -Dhpux -DVARARGS_MSG
  95. #LOCAL_SRC = getdate.y  rtape_lb.c 
  96. #LOCAL_OBJ = getdate.$O rtape_lb.$O alloca.$O
  97. #LDFLAGS =
  98. #LIBS = -lBSD 
  99. #LINT = lint
  100. #LINTFLAGS = -abchx
  101. #DEF_AR_FILE = \"/dev/rct/c3d0s2\"
  102. #DEFBLOCKING = 20
  103. #O = o
  104.  
  105. # IBM AIX version -- this saves "hidden" directories, but doesn't restore
  106. # them as hidden.  Add -Di386 for a PS/2.  If you don't have GCC, turn it off.
  107. # Some people think you need -lbsd, some don't.  Dunno.
  108. CC=cc
  109. DEFS= -DUSG -Daix -DVARARGS_MSG -DHAVE_SIZE_T -DSIGNAL_VOID -DHAVE_STRSTR -DTAPE_IO -I../tape -Dunix
  110. # DEFS= -DUSG -Daix -DSTDC_MSG -DHAVE_MTIO -DHAVE_SIZE_T -DSIGNAL_VOID
  111. LOCAL_SRC =  getdate.y ak_dir.c ak_tape.c tape.c scsi-aix.c errtab.c
  112. LOCAL_OBJ =  getdate.$O ak_dir.$O ak_tape.$O tape.$O scsi-aix.$O errtab.$O
  113. # LOCAL_SRC =  getdate.y rtape_lb.c ak_dir.c ak_tape.c
  114. # LOCAL_OBJ =  getdate.$O rtape_lb.$O ak_dir.$O ak_tape.$O
  115. LDFLAGS =
  116. LIBS = -lbsd
  117. LINT = lint
  118. LINTFLAGS = -p
  119. DEF_AR_FILE = \"/dev/rmt0\"
  120. DEFBLOCKING = 20
  121. O = o
  122. .SOURCE.c : ../tape
  123.  
  124. # USG version
  125. # Add -DNDIR to DEFS if your system uses ndir.h instead of dirent.h
  126. # Add -DDIRECT to DEFS if your system uses 'struct direct' instead of
  127. # 'struct dirent' (this is the case at least with one add-on ndir 
  128. # library)
  129. # Add -DHAVE_MTIO to DEFS if your system has sys/mtio.h and defines MTIOCTOP
  130. # Add -DDAYLIGHT_MISSING to DEFS if your system doesn't define the
  131. # external variable `daylight'.
  132. # Add -lndir to LIBS if your ndir routines aren't in libc.a
  133. # Add -lPW to LIBS if you don't compile with gcc (to get alloca)
  134. #DEFS = -DUSG -DSIGNAL_VOID #-DNDIR -DDIRECT -DHAVE_MTIO
  135. #LOCAL_SRC =  getdate.y rtape_lb.c
  136. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  137. #LDFLAGS =
  138. #LIBS = #-lndir -lPW
  139. #LINT = lint
  140. #LINTFLAGS = -p
  141. #DEF_AR_FILE = \"/dev/rmt8\"
  142. #DEFBLOCKING = 20
  143. #O = o
  144.  
  145. # UniSoft's Uniplus SVR2 with NFS
  146. #DEFS = -DUSG -DUNIPLUS -DNFS -DSVR2 -DSIGNAL_VOID
  147. #LOCAL_SRC =  getdate.y rtape_lb.c
  148. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  149. #LDFLAGS =
  150. #LIBS = -lndir
  151. #LINT = lint
  152. #LINTFLAGS = -bx
  153. #DEF_AR_FILE = \"/dev/rmt8\"
  154. #DEFBLOCKING = 20
  155. #O = o
  156.  
  157. # MASSCOMP version
  158. #CC = ucb cc
  159. #DEFS = -DBSD42
  160. #LOCAL_SRC =  getdate.y rtape_lb.c
  161. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  162. #LDFLAGS =
  163. #LIBS = 
  164. #LINT = lint
  165. #LINTFLAGS = -bx
  166. #DEF_AR_FILE = \"/dev/rmt0\"
  167. #DEFBLOCKING = 20
  168. #O = o
  169.  
  170. # (yuk) MS-DOS (Microsoft C 4.0) version
  171. #MODEL = S
  172. #DEFS = -DNONAMES -A$(MODEL) -DNO_REMOTE
  173. #LOCAL_SRC =  getdate.y rtape_lb.c
  174. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  175. #LDFLAGS =
  176. #LIBS = $(MODEL)dir.lib
  177. #LINT =    $(CC)
  178. #LINTFLAGS = -W3
  179. #DEF_AR_FILE = \"tar.out\"
  180. #DEFBLOCKING = 20
  181. #O = obj
  182.  
  183. # V7 version
  184. # Pick open3 emulation or nonexistence.  See open3.h, port.c.
  185. ##DEFS = -DV7 -DEMUL_OPEN3 -Dvoid=int
  186. ##DEFS = -DV7 -DNO_OPEN3 -Dvoid=int
  187. #LOCAL_SRC =  getdate.y rtape_lb.c
  188. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  189. #LDFLAGS =
  190. #LIBS = -lndir
  191. #LINT = lint
  192. #LINTFLAGS = -abchx
  193. #DEF_AR_FILE = \"/dev/rmt8\"
  194. #DEFBLOCKING = 20
  195. #O = o
  196.  
  197. # Minix version
  198. # No lint, so no lintflags.  Default file is stdin/out.  (Minix "tar"
  199. # doesn't even take an "f" flag, it assumes argv[2] is the archive name!)
  200. # Minix "make" doesn't expand macros right, so Minix users will have
  201. # to expand CFLAGS, SRCS, O, etc by hand, or fix your make.  Not my problem!
  202. # You'll also need to come up with ctime(), the directory
  203. # library, and a fixed doprintf() that handles %*s.  Put this stuff in
  204. # the "SUBSRC/SUBOBJ" macro below if you didn't put it in your C library.
  205. # Note that Minix "cc" produces ".s" files, not .o's, so O = s has been set.
  206. #
  207. # Pick open3 emulation or nonexistence.  See open3.h, port.c.
  208. ##DEFS = -DV7 -DMINIX -DEMUL_OPEN3
  209. ##DEFS = -DV7 -DMINIX -DNO_OPEN3
  210. #LOCAL_SRC =  getdate.y rtape_lb.c
  211. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  212. #LDFLAGS =
  213. #LIBS =
  214. #DEF_AR_FILE = \"-\"
  215. #DEFBLOCKING = 8    # No good reason for this, change at will
  216. #O = s
  217.  
  218. # Xenix version
  219. #DEFS = -DUSG -DXENIX -DSIGNAL_VOID
  220. #LOCAL_SRC =  getdate.y rtape_lb.c
  221. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  222. #LDFLAGS = 
  223. #LIBS = -lx
  224. #LINT = lint
  225. #LINTFLAGS = -p
  226. #DEF_AR_FILE = \"/dev/rmt8\"
  227. #DEFBLOCKING = 20
  228. #O = o
  229.  
  230. # SGI 4D version
  231. # You will need to define NEED_TZSET in getdate.y
  232. #DEFS = -DUSG -I/usr/include/bsd
  233. #LOCAL_SRC = getdate.y rtape_lb.c
  234. #LOCAL_OBJ =  getdate.$O rtape_lb.$O
  235. #LDFLAGS = 
  236. #LIBS = -lxmalloc
  237. #LINT = lint
  238. #LINTFLAGS = -p
  239. #DEF_AR_FILE = \"/dev/tape\"
  240. #DEFBLOCKING = 20
  241. #O = o
  242.  
  243. #CC = gcc
  244. #TARGET_ARCH = 
  245.  
  246. CFLAGS = $(COPTS) $(ALLDEFS)
  247. ALLDEFS = $(DEFS) \
  248.     -DDEF_AR_FILE=$(DEF_AR_FILE) \
  249.     -DDEFBLOCKING=$(DEFBLOCKING)
  250. # next line for Debugging
  251. #COPTS = -g
  252. # next line for Production
  253. COPTS = -O
  254.  
  255. # Add things here like readdir that aren't in your standard libraries.
  256. # (E.g. MSDOS needs msd_dir.c, msd_dir.obj)
  257. SUBSRC=
  258. SUBOBJ=    
  259.  
  260. # Destination directory and installation program for make install
  261. bindir = /usr/local/gnubin
  262. INSTALL = cp
  263. RM = rm -f
  264.  
  265. SRC1 =    tar.c create.c extract.c buffer.c getoldop.c update.c gnu.c mangle.c
  266. SRC2 =  version.c list.c names.c diffarch.c port.c wildmat.c getopt.c getopt1.c regex.c
  267. SRC3 =  $(LOCAL_SRC) $(SUBSRC)
  268. SRCS =    $(SRC1) $(SRC2) $(SRC3)
  269. OBJ1 =    tar.$O create.$O extract.$O buffer.$O getoldop.$O list.$O update.$O
  270. OBJ2 =    version.$O names.$O diffarch.$O port.$O wildmat.$O getopt.$O getopt1.$O regex.$O
  271. OBJ3 =  gnu.$O mangle.$O $(LOCAL_OBJ) $(SUBOBJ)
  272. OBJS =    $(OBJ1) $(OBJ2) $(OBJ3)
  273. # AUX =    README PORTING Makefile TODO tar.h port.h open3.h \
  274. #    msd_dir.h msd_dir.c
  275. AUX =   README COPYING ChangeLog Makefile tar.texinfo tar.h port.h open3.h \
  276.     rmt.h msd_dir.h msd_dir.c rtape_sv.c rtape_lb.c getdate.y \
  277.     getopt.h regex.h level-0 level-1 backup-specs testpad.c
  278.  
  279. # all:    tar rmt
  280.  
  281. tar:    $(OBJS)
  282.     $(CC) $(LDFLAGS) -o tar $(COPTS) $(OBJS) $(LIBS)
  283.  
  284. rmt:    rtape_sv.c
  285.     $(CC) $(CFLAGS) $(LDFLAGS) -o rmt rtape_sv.c
  286.  
  287. testpad.h: testpad
  288.     testpad > testpad.h
  289.  
  290. testpad: testpad.o
  291.     $(CC) -o testpad testpad.o
  292.  
  293. # command is too long for Messy-Dos (128 char line length limit) so
  294. # this kludge is used...
  295. #    @echo $(OBJ1) + > command
  296. #    @echo $(OBJ2) >> command
  297. #    link @command, $@,,$(LIBS) /NOI;
  298. #    @$(RM) command
  299.  
  300. install: tar
  301.     cp tar gtar
  302.     /usr/ucb/install -s gtar /usr/local/bin
  303. # install: all
  304. #    $(RM) $(bindir)/tar
  305. #    $(INSTALL) tar $(bindir)/tar
  306. #    $(INSTALL) rmt /etc/rmt
  307.  
  308. lint:    $(SRCS)
  309.     $(LINT) $(LINTFLAGS) $(ALLDEFS) $(SRCS)
  310.  
  311. TAGS:    $(SRCS)
  312.     etags $(SRCS)
  313.  
  314. clean:
  315.     $(RM) errs $(OBJS) tar rmt testpad.o testpad testpad.h
  316.  
  317. distclean: clean
  318.  
  319. realclean: clean
  320.  
  321. shar: $(SRCS) $(AUX)
  322.     shar $(SRCS) $(AUX) | compress > tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c`.shar.Z
  323.  
  324. dist: $(SRC1) $(SRC2) $(AUX)
  325.     echo tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
  326.     -rm -rf `cat .fname`
  327.     mkdir `cat .fname`
  328.     ln $(SRC1) $(SRC2) $(AUX) `cat .fname`
  329.     tar chZf `cat .fname`.tar.Z `cat .fname`
  330.     -rm -rf `cat .fname` .fname
  331.  
  332. tar.zoo: $(SRCS) $(AUX)
  333.     -mkdir tmp.dir
  334.     -rm tar.zoo
  335.     for X in $(SRCS) $(AUX) ; do echo $$X ; sed 's/$$//' $$X > tmp.dir/$$X ; done
  336.     cd tmp.dir ; zoo aM ../tar.zoo *
  337.     -rmdir tmp.dir
  338.  
  339. $(OBJS): tar.h port.h testpad.h
  340. regex.$O tar.$O: regex.h
  341.