home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / condor40.zip / CONDOR / src / client / Makefile < prev    next >
Makefile  |  1989-05-15  |  4KB  |  132 lines

  1. # Copyright 1986, 1987, 1988, 1989 University of Wisconsin
  2. # Permission to use, copy, modify, and distribute this software and its
  3. # documentation for any purpose and without fee is hereby granted,
  4. # provided that the above copyright notice appear in all copies and that
  5. # both that copyright notice and this permission notice appear in
  6. # supporting documentation, and that the name of the University of
  7. # Wisconsin not be used in advertising or publicity pertaining to
  8. # distribution of the software without specific, written prior
  9. # permission.  The University of Wisconsin makes no representations about
  10. # the suitability of this software for any purpose.  It is provided "as
  11. # is" without express or implied warranty.
  12. # THE UNIVERSITY OF WISCONSIN DISCLAIMS ALL WARRANTIES WITH REGARD TO
  13. # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  14. # FITNESS. IN NO EVENT SHALL THE UNIVERSITY OF WISCONSIN  BE LIABLE FOR
  15. # ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  16. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  17. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  18. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  19. # Authors:  Allan Bricker and Michael J. Litzkow,
  20. #              University of Wisconsin, Computer Sciences Dept.
  21.  
  22.  
  23.  
  24. #
  25. # The following variables must be passed in to this makefile:
  26. #
  27. #    SRCDIR    =    The pathname (relative or absolute) of the source
  28. #                directory (eg. ../src, /var/home/condor/CONDOR/src)
  29. #
  30. #    DSTDIR    =    The pathname (relative or absolute) of the directory
  31. #                which will contain the installed binaries and libraries.
  32. #                There must be "bin" and "lib" subdirectories within DSTDIR.
  33. #
  34. #    COPTS    =    Default flags to cc (eg -O, -g)
  35. #
  36. #    IDENT    =    Any #defines which are not automatically supplied
  37. #                by cpp (eg. -Dsunos40 or -Dsunos32).  Note that
  38. #                cpp provides definitions for architectures (eg.
  39. #                vax, sun, mc68020, sparc)
  40. #
  41.  
  42. DIRECTORY=client
  43.  
  44. PDIR=$(SRCDIR)/$(DIRECTORY)
  45. CFLAGS=$(COPTS) -I$(SRCDIR)/h $(IDENT)
  46.  
  47. #
  48. #    Options to 'ctags'
  49. #
  50. TFLAGS=-dt
  51.  
  52. #
  53. #    Each file in the CSRC list should be prepended by $(PDIR).
  54. #
  55. CSRC= $(PDIR)/loop.c $(PDIR)/condor_cp.c
  56. SSRC=
  57.  
  58. SRC=$(CSRC) $(SSRC)
  59.  
  60. OBJ=loop.o condor_cp.o
  61. LIB=../util_lib/util_lib.a ../xdr_lib/xdr_lib.a
  62. LINTLIB =     ../util_lib/llib-lutil.ln ../xdr_lib/llib-lxdr.ln
  63.  
  64. PROGRAMS=loop condor_cp
  65.  
  66. CLEANUP=$(OBJ) $(PROGRAMS) $(PDIR)/Makefile.bak
  67.  
  68. all: $(PROGRAMS)
  69.  
  70. ALWAYS:
  71.  
  72. release: $(PROGRAMS)
  73.  
  74. lint: ALWAYS
  75.     lint -I$(SRCDIR)/h $(IDENT) $(PDIR)/loop.c $(LINTLIB)
  76.     lint -I$(SRCDIR)/h $(IDENT) $(PDIR)/condor_cp.c $(LINTLIB)
  77.  
  78. clean: ALWAYS
  79.     rm -f $(CLEANUP)
  80.  
  81. tags: ALWAYS
  82.     cd $(PDIR) ; ctags $(TFLAGS) $(CSRC) ; \
  83.     cat ../h/tags ../xdr_lib/tags ../util_lib/tags ../condor__lib/tags \
  84.             >> tags ; sort tags > tags.sorted ; mv tags.sorted tags
  85.  
  86. #############################################################################
  87. # Put program specific things here
  88. #############################################################################
  89.  
  90. CRT0=$(DSTDIR)/lib/condor_rt0.o
  91. C_LIB=$(DSTDIR)/lib/libcondor.a
  92.  
  93. loop: loop.o $(C_LIB)
  94.     ld $(LDOPTS) -o loop $(CRT0) loop.o $(C_LIB)
  95.     
  96. condor_cp: condor_cp.o $(C_LIB)
  97.     ld $(LDOPTS) -o condor_cp $(CRT0) condor_cp.o $(C_LIB)
  98.     
  99. loop.o: $(PDIR)/loop.c
  100.     cc -c $(CFLAGS) $(PDIR)/loop.c
  101.  
  102. condor_cp.o: $(PDIR)/condor_cp.c
  103.     cc -c $(CFLAGS) $(PDIR)/condor_cp.c
  104.  
  105.  
  106. depend: ALWAYS
  107.     grep '^#include' $(CSRC) $(PDIR)/Makefile | grep -v '<' | \
  108.           sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \
  109.           sed 's/\.c/.o/' | \
  110.           sed 's;$(PDIR)/;;' | \
  111.           sed 's;: ;: $$\(SRCDIR)/h/;' | \
  112.     awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
  113.         else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
  114.                else rec = rec " " $$2 } } \
  115.           END { print rec } ' > makedep
  116.     echo '$$r makedep' >>eddep
  117.     echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
  118.     echo '$$r makedep' >>eddep
  119.     echo 'w' >>eddep
  120.     /bin/cp $(PDIR)/Makefile $(PDIR)/Makefile.bak
  121.     ed - $(PDIR)/Makefile < eddep
  122.     rm eddep makedep
  123.  
  124. # DO NOT DELETE THIS LINE -- make depend uses it
  125.  
  126.