home *** CD-ROM | disk | FTP | other *** search
/ Dream 51 / Amiga_Dream_51.iso / Atari / Desktops / text113b.zoo / textutils-1.13 / src / Makefile < prev    next >
Makefile  |  1996-01-22  |  6KB  |  264 lines

  1. # Makefile for GNU text utilities.
  2. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  
  18. SHELL = /bin/sh
  19.  
  20. srcdir = /d/textutils-1.13/src
  21. VPATH = $(srcdir)
  22.  
  23. prefix = 
  24. exec_prefix = 
  25. bindir = $(exec_prefix)/bin
  26. libdir = $(exec_prefix)/lib
  27.  
  28. INSTALL = 
  29. INSTALL_PROGRAM = 
  30. CC = gcc
  31. DEFS = -DHAVE_CONFIG_H
  32. LIBS = -liio
  33. CFLAGS = -O2 -fomit-frame-pointer
  34. LDFLAGS = 
  35. RM = rm
  36. LN = ln
  37. MV = mv
  38.  
  39. SOURCES = cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c \
  40. head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c sum.c tac.c \
  41. tail.c tr.c unexpand.c uniq.c wc.c version.c
  42.  
  43. OBJECTS = cat.o cksum.o comm.o csplit.o cut.o expand.o fmt.o fold.o \
  44. head.o join.o md5sum.o nl.o od.o paste.o pr.o sort.o split.o sum.o tac.o \
  45. tail.o tr.o unexpand.o uniq.o wc.o version.o
  46.  
  47. DISTFILES = ansi2knr.c ansi2knr.1 Makefile.in system.h version.h \
  48. md5-test.rfc $(SOURCES)
  49.  
  50. PROGS = cat.ttp cksum.ttp comm.ttp csplit.ttp cut.ttp expand.ttp fmt.ttp fold.ttp head.ttp join.ttp md5sum.ttp nl.ttp od.ttp \
  51. paste.ttp pr.ttp sort.ttp split.ttp sum.ttp tac.ttp tail.ttp tr.ttp unexpand.ttp uniq.ttp wc.ttp
  52.  
  53. LIBPROGS =
  54.  
  55. all: $(PROGS) $(LIBPROGS)
  56.  
  57. .SUFFIXES:
  58. .SUFFIXES: .c .o
  59.  
  60. COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  61. INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/../lib
  62. .c.o:
  63.     $(COMPILE) $<
  64.  
  65.  
  66. subdir = src
  67. #Makefile: ../config.status Makefile.in
  68. #    cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  69.  
  70. installdirs:
  71.     $(srcdir)/../mkinstalldirs $(bindir)
  72.  
  73. transform = @program_transform_name@
  74. install: install-exec install-data
  75. install-data:
  76. install-exec: all installdirs
  77.     for f in $(PROGS); do \
  78.       $(INSTALL_PROGRAM) $$f \
  79.           $(bindir)/`echo $$f|sed '$(transform)'`; \
  80.     done
  81.  
  82. uninstall:
  83.     for f in $(PROGS); do \
  84.       $(RM) -f \
  85.           $(bindir)/`echo $$f|sed '$(transform)'`; \
  86.     done
  87.  
  88. TAGS: $(SOURCES)
  89.     etags $(SOURCES)
  90.  
  91. check: md5sum.ttp
  92.     ./md5sum \
  93.       --string="" \
  94.       --string="a" \
  95.       --string="abc" \
  96.       --string="message digest" \
  97.       --string="abcdefghijklmnopqrstuvwxyz" \
  98.       --string="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" \
  99.       --string="12345678901234567890123456789012345678901234567890123456789012345678901234567890" \
  100.     | diff -c $(srcdir)/md5-test.rfc -
  101.  
  102. clean:
  103.     $(RM) -f $(PROGS) $(LIBPROGS) ansi2knr core krtmp*.c *._c *._o *.o
  104.  
  105. mostlyclean: clean
  106.  
  107. distclean: clean
  108.     $(RM) -f Makefile
  109.  
  110. maintainer-clean: distclean
  111.     $(RM) -f TAGS
  112.  
  113. distdir = ../`cat ../distname`/$(subdir)
  114. dist: $(DISTFILES)
  115.     for file in $(DISTFILES); do \
  116.       $(LN) $$file $(distdir) \
  117.         || { echo copying $$file instead; cp -p $$file $(distdir);}; \
  118.     done
  119.  
  120. # Linking rules.
  121.  
  122. ansi2knr: ansi2knr.o
  123.     $(link_command) ansi2knr.o $(LIBS)
  124.  
  125. link_command = $(CC) $(LDFLAGS) -o $@
  126.  
  127. cat.ttp: cat.o
  128.     $(link_command) cat.o ../lib/libtu.a version.o $(LIBS)
  129.     strip -k $@
  130.     chmod +x $@
  131.  
  132. cksum.ttp: cksum.o
  133.     $(link_command) cksum.o ../lib/libtu.a version.o $(LIBS)
  134.     strip -k $@
  135.     chmod +x $@
  136.  
  137. comm.ttp: comm.o
  138.     $(link_command) comm.o ../lib/libtu.a version.o $(LIBS)
  139.     strip -k $@
  140.     chmod +x $@
  141.  
  142. csplit.ttp: csplit.o
  143.     $(link_command) csplit.o ../lib/libtu.a version.o $(LIBS)
  144.     strip -k $@
  145.     chmod +x $@
  146.  
  147. cut.ttp: cut.o
  148.     $(link_command) cut.o ../lib/libtu.a version.o $(LIBS)
  149.     strip -k $@
  150.     chmod +x $@
  151.  
  152. expand.ttp: expand.o
  153.     $(link_command) expand.o ../lib/libtu.a version.o $(LIBS)
  154.     strip -k $@
  155.     chmod +x $@
  156.  
  157. fmt.ttp: fmt.o
  158.     $(link_command) fmt.o ../lib/libtu.a version.o $(LIBS)
  159.     strip -k $@
  160.     chmod +x $@
  161.  
  162. fold.ttp: fold.o
  163.     $(link_command) fold.o ../lib/libtu.a version.o $(LIBS)
  164.     strip -k $@
  165.     chmod +x $@
  166.  
  167. head.ttp: head.o
  168.     $(link_command) head.o ../lib/libtu.a version.o $(LIBS)
  169.     strip -k $@
  170.     chmod +x $@
  171.  
  172. join.ttp: join.o
  173.     $(link_command) join.o ../lib/libtu.a version.o $(LIBS)
  174.     strip -k $@
  175.     chmod +x $@
  176.  
  177. md5sum.ttp: md5sum.o
  178.     $(link_command) md5sum.o ../lib/libtu.a version.o $(LIBS)
  179.     strip -k $@
  180.     chmod +x $@
  181.  
  182. nl.ttp: nl.o
  183.     $(link_command) nl.o ../lib/libtu.a version.o $(LIBS)
  184.     strip -k $@
  185.     chmod +x $@
  186.  
  187. od.ttp: od.o
  188.     $(link_command) od.o ../lib/libtu.a version.o
  189.     strip -k $@
  190.     chmod +x $@
  191.  
  192. paste.ttp: paste.o
  193.     $(link_command) paste.o ../lib/libtu.a version.o $(LIBS)
  194.     strip -k $@
  195.     chmod +x $@
  196.  
  197. pr.ttp: pr.o
  198.     $(link_command) pr.o ../lib/libtu.a version.o $(LIBS)
  199.     strip -k $@
  200.     chmod +x $@
  201.  
  202. sort.ttp: sort.o
  203.     $(link_command) sort.o ../lib/libtu.a version.o $(LIBS)
  204.     strip -k $@
  205.     chmod +x $@
  206.  
  207. split.ttp: split.o
  208.     $(link_command) split.o ../lib/libtu.a version.o $(LIBS)
  209.     strip -k $@
  210.     chmod +x $@
  211.  
  212. sum.ttp: sum.o
  213.     $(link_command) sum.o ../lib/libtu.a version.o $(LIBS)
  214.     strip -k $@
  215.     chmod +x $@
  216.  
  217. tac.ttp: tac.o
  218.     $(link_command) tac.o ../lib/libtu.a version.o $(LIBS)
  219.     strip -k $@
  220.     chmod +x $@
  221.  
  222. tail.ttp: tail.o
  223.     $(link_command) tail.o ../lib/libtu.a version.o $(LIBS)
  224.     strip -k $@
  225.     chmod +x $@
  226.  
  227. tr.ttp: tr.o
  228.     $(link_command) tr.o ../lib/libtu.a version.o $(LIBS)
  229.     strip -k $@
  230.     chmod +x $@
  231.  
  232. unexpand.ttp: unexpand.o
  233.     $(link_command) unexpand.o ../lib/libtu.a version.o $(LIBS)
  234.     strip -k $@
  235.     chmod +x $@
  236.  
  237. uniq.ttp: uniq.o
  238.     $(link_command) uniq.o ../lib/libtu.a version.o $(LIBS)
  239.     strip -k $@
  240.     chmod +x $@
  241.  
  242. wc.ttp: wc.o
  243.     $(link_command) wc.o ../lib/libtu.a version.o $(LIBS)
  244.     strip -k $@
  245.     chmod +x $@
  246.  
  247.  
  248. $(PROGS) $(LIBPROGS): ../lib/libtu.a version.o
  249. csplit.o nl.o tac.o: ../lib/regex.h
  250. comm$O nl.o uniq.o: ../lib/linebuffer.h
  251. od.o tail.o: ../lib/xstrtol.h
  252. join.o md5sum$O sort.o: ../lib/long-options.h
  253.  
  254. # Make all .o files depend on these files even though there are a few
  255. # unnecessary dependencies.
  256. $(OBJECTS): ../config.h ../lib/error.h system.h version.h
  257.  
  258. .PHONY: all check clean dist distclean install install-data install-exec \
  259. installdirs maintainer-clean mostlyclean uninstall
  260.  
  261. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  262. # Otherwise a system limit (for SysV at least) may be exceeded.
  263. .NOEXPORT:
  264.