home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume2 / window / part2 / Makefile < prev    next >
Encoding:
Makefile  |  1986-11-30  |  2.2 KB  |  96 lines

  1. #
  2. #    Makefile for wm
  3. #
  4.  
  5. # Flags for the C compiler.
  6. CFLAGS    = -O
  7.  
  8. # Flags for loader.  You probably do not need any.
  9. LDFLAGS    = 
  10.  
  11. # Final resting place of wm executable.
  12. BIN    = /usr/local
  13.  
  14. # Name of owner and group that you want installed wm to have.
  15. OWNER    = bin
  16. GROUP    = bin
  17.  
  18. # Version of libcurses wm is linked with. This *must* be
  19. # the version that is distributed with wm, since it contains
  20. # several bug fixes necessary to the correct operation of wm.
  21. LIBS    = -lcurses -ltermcap
  22.  
  23. OBJS = cmd.o curses.o getch.o hacks.o help.o misc.o \
  24.     save.o shell.o vterm.o wlist.o wm.o
  25. SRCS = cmd.c curses.c getch.c hacks.c help.c misc.c \
  26.     save.c shell.c vterm.c wlist.c wm.c
  27.  
  28. wm: $(OBJS)
  29.     $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o wm
  30.  
  31. $(OBJS): wm.h
  32.  
  33. lint: 
  34.     lint -hbux $(SRCS)
  35.  
  36. clean:
  37.     /bin/rm -f *.o wm core *.out
  38.  
  39. install: wm
  40.     install -o $(OWNER) -g $(GROUP) -s wm $(DESTDIR)/$(BIN)
  41.  
  42. depend:
  43.     cat </dev/null >x.c
  44.     for i in ${SRCS}; do \
  45.         (echo `basename $$i .c`.o: $$i >>makedep; \
  46.         /bin/grep '^#[     ]*include' x.c $$i | sed \
  47.             -e 's,<\(.*\)>,"/usr/include/\1",' \
  48.             -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
  49.             -e 's/\.c/.o/' >>makedep); done
  50.     echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
  51.     echo '$$r makedep' >>eddep
  52.     echo 'w' >>eddep
  53.     cp Makefile Makefile.bak
  54.     ed - Makefile < eddep
  55.     rm eddep makedep x.c
  56.     echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
  57.     echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
  58.     echo '# see make depend above' >> Makefile
  59.  
  60. # DO NOT DELETE THIS LINE -- make depend uses it
  61.  
  62. cmd.o: cmd.c
  63. cmd.o: wm.h
  64. curses.o: curses.c
  65. curses.o: wm.h
  66. getch.o: getch.c
  67. getch.o: wm.h
  68. getch.o: /usr/include/signal.h
  69. getch.o: /usr/include/setjmp.h
  70. getch.o: /usr/include/sys/time.h
  71. hacks.o: hacks.c
  72. hacks.o: wm.h
  73. help.o: help.c
  74. help.o: wm.h
  75. misc.o: misc.c
  76. misc.o: wm.h
  77. save.o: save.c
  78. save.o: wm.h
  79. shell.o: shell.c
  80. shell.o: wm.h
  81. shell.o: /usr/include/signal.h
  82. shell.o: /usr/include/errno.h
  83. vterm.o: vterm.c
  84. vterm.o: wm.h
  85. wlist.o: wlist.c
  86. wlist.o: wm.h
  87. wm.o: wm.c
  88. wm.o: wm.h
  89. wm.o: /usr/include/signal.h
  90. wm.o: /usr/include/sys/wait.h
  91. wm.o: /usr/include/sys/time.h
  92. wm.o: /usr/include/sys/resource.h
  93. # DEPENDENCIES MUST END AT END OF FILE
  94. # IF YOU PUT STUFF HERE IT WILL GO AWAY
  95. # see make depend above
  96.