home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / futils / futils-2.0 / fu2-diff.zoo / src / Makefile next >
Encoding:
Makefile  |  1991-06-14  |  4.3 KB  |  182 lines

  1. # Makefile for GNU fileutils.
  2. # Do not use this makefile directly, but only from `../Makefile'.
  3. # Copyright (C) 1986, 1988, 1989, 1990 Free Software Foundation, Inc.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. SHELL = /bin/sh
  20.  
  21. YACC   = bison -y
  22. CC     = cgcc
  23. AR     = car
  24. RANLIB = car s   
  25. CFLAGS = -DSTPCPY_MISSING -DSTRDUP_MISSING -DMKFIFO_MISSING\
  26.      -DFTRUNCATE_MISSING -DFCHMOD_MISSING -D_POSIX_SOURCE\
  27.      -DFTIME_MISSING  -I. -I../lib -O -fstrength-reduce
  28.  
  29. LDFLAGS = -s
  30. LIBS = ../lib/libfu.olb -liio 
  31.  
  32. SOURCES = cat.c chmod.c chgrp.c chown.c cmp.c cp-aux.c cp-hash.c cp.c cut.c \
  33. dd.c du.c expand.c head.c install.c ln.c ls.c mkdir.c \
  34. mkfifo.c mv.c mvdir.c paste.c rm.c rmdir.c tac.c \
  35. split.c tail.c touch.c unexpand.c
  36.  
  37. DISTFILES = Makefile cp.h system.h $(SOURCES)
  38.  
  39. # Executable files in this directory.
  40. PROGS = cat.ttp chmod.ttp cmp.ttp cp.ttp cut.ttp dd.ttp du.ttp\
  41.     expand.ttp head.ttp ln.ttp dir.ttp vdir.ttp ls.ttp mkdir.ttp\
  42.     mv.ttp paste.ttp rm.ttp rmdir.ttp split.ttp tac.ttp tail.ttp\
  43.     touch.ttp ginstall.ttp unexpand.ttp
  44.  
  45. all: $(PROGS) $(LIBPROGS)
  46. .PHONY: all
  47.  
  48. install: all
  49.     [ x$(LIBPROGS) = x ] || ./ginstall -o root -m 4755 $(LIBPROGS) $(LIBDIR)
  50.     ./ginstall $(PROGS) $(BINDIR)
  51.     cd $(BINDIR); ./ln -f dir d; ./ln -f vdir v; ./mv -f ginstall install
  52. .PHONY: install
  53.  
  54. tags: $(SOURCES)
  55.     ctags $(SOURCES)
  56.  
  57. TAGS: $(SOURCES)
  58.     etags $(SOURCES)
  59.  
  60. # Use /bin/rm instead of ./rm in case ./rm is compiled for a different
  61. # architecture.
  62. clean:
  63.     /bin/rm -f $(PROGS) $(LIBPROGS) *.o tags TAGS a.out core
  64. .PHONY: clean
  65.  
  66. dist:
  67.     ln $(DISTFILES) ../$(DISTDIR)/src
  68. .PHONY: dist
  69.  
  70. # Linking rules.
  71.  
  72. $(PROGS): ../lib/libfu.olb
  73.  
  74. cat.ttp: cat.o
  75.     $(CC) $(LDFLAGS) -o $@ cat.o  $(LIBS)
  76.  
  77. chmod.ttp: chmod.o
  78.     $(CC) $(LDFLAGS) -o $@ chmod.o  $(LIBS)
  79.  
  80. chgrp.ttp: chgrp.o
  81.     $(CC) $(LDFLAGS) -o $@ chgrp.o  $(LIBS)
  82.  
  83. chown.ttp: chown.o
  84.     $(CC) $(LDFLAGS) -o $@ chown.o  $(LIBS)
  85.  
  86. cmp.ttp: cmp.o
  87.     $(CC) $(LDFLAGS) -o $@ cmp.o  $(LIBS)
  88.  
  89. cp.ttp: cp.o cp-hash.o cp-aux.o mknod.o
  90.     $(CC) $(LDFLAGS) -o $@ cp.o cp-hash.o cp-aux.o mknod.o  $(LIBS)
  91.  
  92. cut.ttp: cut.o
  93.     $(CC) $(LDFLAGS) -o $@ cut.o  $(LIBS)
  94.  
  95. dd.ttp: dd.o
  96.     $(CC) $(LDFLAGS) -o $@ dd.o  $(LIBS)
  97.  
  98. dir.ttp: dir.o
  99.     $(CC) $(LDFLAGS) -o $@ dir.o  $(LIBS)
  100.  
  101. du.ttp: du.o
  102.     $(CC) $(LDFLAGS) -o $@ du.o  $(LIBS)
  103.  
  104. expand.ttp: expand.o
  105.     $(CC) $(LDFLAGS) -o $@ expand.o  $(LIBS)
  106.  
  107. ginstall.ttp: install.o
  108.     $(CC) $(LDFLAGS) -o $@ install.o  $(LIBS)
  109.  
  110. head.ttp: head.o
  111.     $(CC) $(LDFLAGS) -o $@ head.o $(LIBS)
  112.  
  113. ln.ttp: ln.o
  114.     $(CC) $(LDFLAGS) -o $@ ln.o  $(LIBS)
  115.  
  116. ls.ttp: ls.o
  117.     $(CC) $(LDFLAGS) -o $@ ls.o $(LIBS)
  118.  
  119. mkdir.ttp: mkdir.o
  120.     $(CC) $(LDFLAGS) -o $@ mkdir.o  $(LIBS)
  121.  
  122. mkfifo.ttp: mkfifo.o
  123.     $(CC) $(LDFLAGS) -o $@ mkfifo.o $(LIBS)
  124.  
  125. mv.ttp: mv.o
  126.     $(CC) $(LDFLAGS) -o $@ mv.o $(LIBS)
  127.  
  128. mvdir.ttp: mvdir.o
  129.     $(CC) $(LDFLAGS) -o $@ mvdir.o $(LIBS)
  130.  
  131. paste.ttp: paste.o
  132.     $(CC) $(LDFLAGS) -o $@ paste.o $(LIBS)
  133.  
  134. rm.ttp: rm.o
  135.     $(CC) $(LDFLAGS) -o $@ rm.o  $(LIBS)
  136.  
  137. rmdir.ttp: rmdir.o
  138.     $(CC) $(LDFLAGS) -o $@ rmdir.o  $(LIBS)
  139.  
  140. split.ttp: split.o
  141.     $(CC) $(LDFLAGS) -o $@ split.o  $(LIBS)
  142.  
  143. tac.ttp: tac.o
  144.     $(CC) $(LDFLAGS) -o $@ tac.o  $(LIBS)
  145.  
  146. tail.ttp: tail.o
  147.     $(CC) $(LDFLAGS) -o $@ tail.o  $(LIBS)
  148.  
  149. touch.ttp: touch.o
  150.     $(CC) $(LDFLAGS) -o $@ touch.o  $(LIBS)
  151.  
  152. unexpand.ttp: unexpand.o
  153.     $(CC) $(LDFLAGS) -o $@ unexpand.o  $(LIBS)
  154.  
  155. vdir.ttp: vdir.o
  156.     $(CC) $(LDFLAGS) -o $@ vdir.o $(LIBS)
  157.  
  158. # Compilation rules.
  159.  
  160. chmod.o mkdir.o mkfifo.o: ../lib/modechange.h
  161.  
  162. cp.o mv.o ln.o: ../lib/backupfile.h
  163.  
  164. cp.o cp-hash.o cp-aux.o: cp.h
  165.  
  166. tac.o: ../lib/regex.h
  167.  
  168. # C compilers that can't handle -c and -o together need the following:
  169. #dir.o:        ls.c
  170. #    $(CC) $(CFLAGS) -DMULTI_COL -c ls.c
  171. #    mv ls.o dir.o
  172. #
  173. #vdir.o:        ls.c
  174. #    $(CC) $(CFLAGS) -DLONG_FORMAT -c ls.c
  175. #    mv ls.o vdir.o
  176.  
  177. dir.o:        ls.c
  178.     $(CC) $(CFLAGS) -DMULTI_COL -o dir.o -c ls.c
  179.  
  180. vdir.o:        ls.c
  181.     $(CC) $(CFLAGS) -DLONG_FORMAT -o vdir.o -c ls.c
  182.