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.emx < prev    next >
Makefile  |  1992-11-11  |  6KB  |  178 lines

  1. ###############################################################################
  2. # $Id: makefile.emx,v 1.6 1992/09/16 21:00:00 ak Exp $
  3. ###############################################################################
  4. # $Log: makefile.emx,v $
  5. # Revision 1.6  1992/09/16  21:00:00  ak
  6. # EMX 0.8e
  7. #
  8. # Revision 1.5  1992/09/13  21:16:03  ak
  9. # Wieder getdate vom Original, 1.10 ist da wesentlich neuer und
  10. # vollstaendiger als 1.06.
  11. #
  12. # Revision 1.4  1992/09/12  16:07:14  ak
  13. # Added entry for --fat to usage
  14. #
  15. # Revision 1.3  1992/09/12  15:57:52  ak
  16. # - Usenet patches for GNU TAR 1.10
  17. # - Bugfixes and patches of Kai Uwe Rommel:
  18. #         filename conversion for FAT
  19. #         EMX 0.8e
  20. #         -0..1 alias for a: b:
  21. #         -2..7 alias for +++TAPE$x
  22. #
  23. # Revision 1.2  1992/09/11  21:17:55  ak
  24. # Added -Uunix
  25. #
  26. # Revision 1.1  1992/09/02  20:07:38  ak
  27. # Initial revision
  28. #
  29. ###############################################################################
  30.  
  31. # Makefile for GNU tar program.
  32.  
  33. # In order to disable remote-tape support, add -DNO_REMOTE to the
  34. # appropriate DEFS line, and remove rtape_lib.* from LOCAL_{SRC,OBJ}
  35. # For Ultrix 3.1, you will have to compile rtape_lib.c with -DUSG.
  36. # Add -DUSE_REXEC to use rexec for remote tape operations
  37. # instead of forking rsh or remsh.
  38. #
  39. # If tar fails to properly print error msgs, or core-dumps doing same,
  40. # you may need to change which version of msg...() you are using.
  41. # To do so, add one of the following to your DEFS= line
  42. # -DSTDC_MSG        If you are using an ANSI compiler, and have vfprintf().
  43. # -DVARARGS_MSG        If you have varargs.h and vfprintf()
  44. # -DDOPRNT_MSG        If you have _doprnt(), and no useful varargs support
  45. # -DLOSING_MSG        If nothing else works.
  46. #
  47. # Some non-BSD systems may have to add -DNEED_TZSET in order to have getdate.y
  48. # compile correctly.
  49. #
  50. # If you have a system V system which defines size_t, add -DHAVE_SIZE_T.
  51. # If you have a system which defines strstr, add -DHAVE_STRSTR.
  52. #
  53. # If you can't use remote tar with the rmt library, you can still get
  54. # some stuff to work right by adding -DUSE_REXEC.
  55. #
  56. # Some people's systems define a prototype for signal handlers which
  57. # require them to be declared as void.  If you get such problems in
  58. # rtape_lib, function command, then define -DSIGNAL_VOID.  
  59. #
  60. # getdate.y has 8 shift/reduce conflicts.
  61. #
  62. # In addition to setting DEFS appropriately for your system, you might
  63. # have to hand edit the #defines and #undefs in port.c.
  64.  
  65. TAPEDIR= ../tape
  66. bindir = $(ROOTDIR)/usr/bin32
  67.  
  68.     .IF $O == .obj
  69. COPTS = -O2
  70.     .ELSE
  71. COPTS = -O2 -g
  72.     .END
  73.  
  74. ## GNU version
  75. DEFS = -DMSDOS -DNONAMES -DOS2=2 -DSTDC_MSG -DTAPE_IO -I$(TAPEDIR)
  76. LOCAL_SRC = getdate.y ak_dir.c ak_tape.c tape.c scsitape.c errtab.c
  77. LOCAL_OBJ = getdate$O ak_dir$O ak_tape$O tape$O scsitape$O errtab$O
  78. LDFLAGS +=
  79. LIBS = -lx -los2
  80. LINT = lint
  81. LINTFLAGS = -abchx
  82. DEFBLOCKING = 20
  83.  
  84. .SOURCE.h : . $(TAPEDIR)
  85. .SOURCE.c : . $(TAPEDIR)
  86. .SOURCE.o   : OBJ$O
  87. .SOURCE.obj : OBJ$O
  88.  
  89. #CC = gcc
  90. #TARGET_ARCH = 
  91.  
  92. CFLAGS += $(COPTS) $(ALLDEFS)
  93. ALLDEFS = $(DEFS) \
  94.     -DDEFBLOCKING=$(DEFBLOCKING)
  95. ##AK    -DDEF_AR_FILE=$(DEF_AR_FILE)
  96.  
  97. # Add things here like readdir that aren't in your standard libraries.
  98. # (E.g. MSDOS needs msd_dir.c, msd_dir.obj)
  99. SUBSRC=
  100. SUBOBJ=    
  101.  
  102. # Destination directory and installation program for make install
  103. INSTALL = cp
  104. RM = rm -ce
  105.  
  106. SRC1 =    tar.c create.c extract.c buffer.c getoldop.c update.c gnu.c mangle.c
  107. SRC2 =  version.c list.c names.c diffarch.c port.c wildmat.c getopt.c getopt1.c
  108. SRC3 =  $(LOCAL_SRC) $(SUBSRC)
  109. SRCS =    $(SRC1) $(SRC2) $(SRC3)
  110. OBJ1 =    tar$O create$O extract$O buffer$O getoldop$O list$O update$O
  111. OBJ2 =    version$O names$O diffarch$O port$O wildmat$O getopt$O getopt1$O
  112. OBJ3 =  gnu$O mangle$O $(LOCAL_OBJ) $(SUBOBJ)
  113. OBJS =    $(OBJ1) $(OBJ2) $(OBJ3)
  114. # AUX =    README PORTING Makefile TODO tar.h port.h open3.h \
  115. #    msd_dir.h msd_dir.c
  116. AUX =   README COPYING ChangeLog Makefile tar.texinfo tar.h port.h open3.h \
  117.     rmt.h msd_dir.h msd_dir.c rtape_server.c rtape_lib.c getdate.y \
  118.     getopt.h regex.h level-0 level-1 backup-specs testpad.c
  119.  
  120.     .IF $O == .obj
  121. all:    tar-omf$E
  122.     .ELSE
  123. all:    tar-emx$E
  124.     .END
  125.  
  126. tar-omf$E: $(OBJS)
  127.     $(CC) $(LDFLAGS) -o $@ $(COPTS) $< $(LIBS) tar.def
  128.  
  129. tar-emx$E: $(OBJS)
  130.     $(CC) $(LDFLAGS) -o $@ $(COPTS) $< $(LIBS)
  131.  
  132. rmt$E:    rtape_server.c
  133.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rtape_server.c
  134.  
  135. testpad.h: testpad$E
  136.     testpad > testpad.h
  137.  
  138. testpad4E: testpad$O
  139.     $(CC) -o $@ testpad$O
  140.  
  141. install: all
  142.     -$(RM) $(bindir)/tar$E
  143.     $(INSTALL) tar-omf$E $(bindir)/tar.exe
  144.  
  145. lint:    $(SRCS)
  146.     $(LINT) $(LINTFLAGS) $(ALLDEFS) $(SRCS)
  147.  
  148. TAGS:    $(SRCS)
  149.     etags $(SRCS)
  150.  
  151. clean:
  152.     $(RM) errs $(OBJS) tar rmt testpad$O testpad testpad.h
  153.  
  154. distclean: clean
  155.  
  156. realclean: clean
  157.  
  158. shar: $(SRCS) $(AUX)
  159.     shar $(SRCS) $(AUX) | compress > tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c`.shar.Z
  160.  
  161. dist: $(SRC1) $(SRC2) $(AUX)
  162.     echo tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
  163.     -rm -rf `cat .fname`
  164.     mkdir `cat .fname`
  165.     ln $(SRC1) $(SRC2) $(AUX) `cat .fname`
  166.     tar chZf `cat .fname`.tar.Z `cat .fname`
  167.     -rm -rf `cat .fname` .fname
  168.  
  169. tar.zoo: $(SRCS) $(AUX)
  170.     -mkdir tmp.dir
  171.     -rm tar.zoo
  172.     for X in $(SRCS) $(AUX) ; do echo $$X ; sed 's/$$//' $$X > tmp.dir/$$X ; done
  173.     cd tmp.dir ; zoo aM ../tar.zoo *
  174.     -rmdir tmp.dir
  175.  
  176. $(OBJS): tar.h port.h testpad.h
  177. regex$O tar$O: regex.h
  178.