home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cops_104.zip / cops_104 / makefile < prev    next >
Makefile  |  1992-03-10  |  3KB  |  109 lines

  1. #  Simple Makefile for the COPS system; compiles, and chmods 
  2. # the programs.
  3. #
  4. #    make all        -- makes everything
  5. #    make install        -- puts things in their place
  6. #    make <program_name> -- make a given program
  7. INSTALL_DIR= sun
  8.  
  9. EXECUTABLE = home.chk user.chk pass.chk is_writable crc crc_check \
  10.          addto clearfiles filewriters members tilde is_able
  11. C_SRC      = home.chk.c user.chk.c is_able.c pass.c is_something.c \
  12.          addto.c clearfiles.c filewriters.c members.c tilde.c \
  13.          crc.c crc_check.c
  14. SHELL_PROGS= chk_strings root.chk dev.chk cron.chk is_able.chk \
  15.          cops group.chk rc.chk passwd.chk ftp.chk crc.chk \
  16.          misc.chk suid.chk kuang init_kuang reconfig res_diff \
  17.          yp_pass.chk bug.chk bug.chk.aix bug.chk.apollo \
  18.          bug.chk.dec bug.chk.next bug.chk.sgi bug.chk.sun \
  19.          bug.chk.svr4 bug_cmp
  20. SUPPORT    = is_able.lst suid.stop crc_list
  21.  
  22. #
  23. CFLAGS     = -O
  24. # sequents need "-lseq" as well... uncomment this if you're running on one:
  25. # SEQFLAGS   = -lseq
  26.  
  27. #  Certain systems need to uncomment this to compile the pass.chk; Xenix,
  28. # some SysV:
  29. # BRAINDEADFLAGS = -lcrypt
  30. #
  31. # systems without rindex need to uncomment this:
  32. # CRC_FLAG=-Dstrrchr=rindex
  33.  
  34. #
  35. # Where the programs are....
  36. #
  37. CHMOD=/bin/chmod
  38. TEST=/bin/test
  39. MKDIR=/bin/mkdir
  40. CP=/bin/cp
  41. CC=/bin/cc
  42. RM=/bin/rm
  43.  
  44. # make default
  45. default:    $(EXECUTABLE)
  46.         $(CHMOD) u+x $(SHELL_PROGS)
  47.  
  48. # make all
  49. all:    $(EXECUTABLE)
  50.     cd docs; make
  51.     $(CHMOD) u+x $(SHELL_PROGS)
  52.  
  53. #  hammer the binaries and formatted docs; if compiled fcrypt stuff,
  54. # will trash the *.o files, too.
  55. clean:
  56.     $(RM) -f $(EXECUTABLE) pass.o crack-fcrypt.o crack-lib.o
  57.     cd docs; make clean
  58.  
  59. man:
  60.     cd docs; make
  61.  
  62. # make a dir and shove everything in the proper place
  63. install:
  64.     -if $(TEST) ! -d $(INSTALL_DIR) ; then mkdir $(INSTALL_DIR) ; fi
  65.     $(CP) $(EXECUTABLE) $(SHELL_PROGS) $(SUPPORT) $(INSTALL_DIR)
  66.  
  67. # make the programs
  68. addto: src/addto.c
  69.     $(CC) $(CFLAGS) -o addto src/addto.c
  70.  
  71. clearfiles: src/clearfiles.c
  72.     $(CC) $(CFLAGS) -o clearfiles src/clearfiles.c
  73.  
  74. filewriters: src/filewriters.c
  75.     $(CC) $(CFLAGS) -o filewriters src/filewriters.c
  76.  
  77. members: src/members.c
  78.     $(CC) $(CFLAGS) -o members src/members.c
  79.  
  80. home.chk: src/home.chk.c
  81.     $(CC) $(CFLAGS) -o home.chk src/home.chk.c
  82.  
  83. user.chk: src/user.chk.c
  84.     $(CC) $(CFLAGS) -o user.chk src/user.chk.c
  85.  
  86. is_able: src/is_able.c
  87.     $(CC) $(CFLAGS) -o is_able src/is_able.c
  88.  
  89. is_writable: src/is_something.c
  90.     $(CC) $(CFLAGS) -DWRITABLE -o is_writable src/is_something.c
  91.  
  92. #   If fast crypt will work, comment the first CC line, uncomment
  93. # the next two:
  94. pass.chk: src/pass.c
  95.     $(CC) $(CFLAGS) -o pass.chk src/pass.c $(BRAINDEADFLAGS)
  96. #     $(CC) $(CFLAGS) -Dcrypt=fcrypt -DFCRYPT -o pass.chk src/pass.c \
  97. #     src/crack-fcrypt.c src/crack-lib.c $(BRAINDEADFLAGS)
  98.  
  99. tilde: src/tilde.c
  100.     $(CC) $(CFLAGS) -o tilde src/tilde.c
  101.  
  102. crc: src/crc.c
  103.     $(CC) $(CFLAGS) -o crc src/crc.c $(SEQFLAGS)
  104.  
  105. crc_check: src/crc_check.c
  106.     $(CC) $(CFLAGS) $(CRC_FLAG) -o crc_check src/crc_check.c $(SEQFLAGS)
  107.  
  108. # the end
  109.