home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / QTERM / PART02.Z / PART02 / Makefile next >
Encoding:
Makefile  |  1998-07-24  |  1.9 KB  |  86 lines

  1. #
  2. # Copyright (c) 1990 Michael A. Cooper.
  3. # This software may be freely distributed provided it is not sold for 
  4. # profit and the author is credited appropriately.
  5. #
  6. # $Header: /src/common/usc/bin/qterm/RCS/Makefile,v 5.1 1991/02/20 02:31:50 mcooper Exp $
  7. #
  8. # Makefile for QTerm
  9. #
  10.  
  11. #
  12. # DIR is the main/top-level directory.
  13. # If you change DIR, run "make reconfig".
  14. #
  15. DIR = /usr/usc
  16.  
  17. #
  18. # BIN is were the "qterm" binary gets installed.
  19. #
  20. BIN = $(DIR)/bin
  21.  
  22. #
  23. # MAN is the directory where the "qterm.1" man page goes.
  24. #
  25. MAN = $(DIR)/man/man1
  26.  
  27. #
  28. # TABFILE should be set to the location you want the qterm table
  29. # file placed in.
  30. #
  31. TABFILE = $(DIR)/lib/qtermtab
  32.  
  33. #
  34. # Add "-DUSG5" to DEFS below, if your system is Unix System V.
  35. # Add "-DHAS_VARARGS" if your system supports varargs.
  36. # Add "-DOPT_COMPAT" if you want compatibility with old command line options.
  37. #
  38. DEFS     = -DTABFILE=\"$(TABFILE)\" -DOPT_COMPAT
  39.  
  40. #
  41. # On some System V systems you will need to add "-lPW" to LIBS.
  42. #
  43. LIBS    =
  44.  
  45.  
  46. CONFIGFILES    = Makefile qterm.1 options.3
  47. CFILES         = qterm.c options.c
  48. HFILES        = qterm.h options.h
  49. OBJS         = qterm.o options.o
  50. CFLAGS         = -O $(DEFS)
  51.  
  52.  
  53. qterm: $(OBJS) $(HFILES)
  54.     $(CC) $(CFLAGS) $(OBJS) -o qterm $(LIBS)
  55.  
  56. reconfig:
  57.     -@for i in $(CONFIGFILES); do \
  58.                 echo ReConfiguring $$i...;\
  59.         sed "s;/usr/usc;$(DIR);g" < $$i > $$i.tmp;\
  60.         mv -f $$i.tmp $$i;\
  61.         done
  62.  
  63. $(OBJS): $(HFILES)
  64.  
  65. shar:
  66.     shar README qtermtab $(CONFIGFILES) $(CFILES) $(HFILES) > qterm.shar
  67.  
  68. clean:
  69.     rm -f *.o core log *~ \#* qterm qterm.shar o
  70.  
  71. #
  72. # Install target for BSD machines.
  73. #
  74. install: qterm qterm.1 qtermtab
  75.     install -c -m 755 qterm $(BIN)
  76.     install -c -m 644 qterm.1 $(MAN)
  77.     install -c -m 644 qtermtab $(TABFILE)
  78.  
  79. #
  80. # Install target for System V machines.
  81. #
  82. install.usg5: qterm qterm.1 qtermtab
  83.     cp qterm $(BIN); chmod 755 $(BIN)/qterm
  84.     cp qterm.1 $(MAN); chmod 644 $(MAN)/qterm.1
  85.     cp qtermtab $(TABFILE); chmod 644 $(TABFILE)
  86.