home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / screen-3.5 / part02 / Makefile.in < prev    next >
Encoding:
Makefile  |  1993-07-25  |  9.8 KB  |  304 lines

  1. #
  2. # Makefile template for screen 
  3. #
  4. # See machine dependant config.h for more configuration options.
  5. #
  6.  
  7. srcdir = @srcdir@
  8. VPATH = @srcdir@
  9.  
  10. # Where to install screen.
  11.  
  12. prefix = /usr/local
  13. exec_prefix = $(prefix)
  14.  
  15. bindir  = $(exec_prefix)/bin
  16. mandir  = $(prefix)/man
  17.  
  18. VERSION = @VERSION@
  19.  
  20. ETCSCREENRC = `sed < config.h -n -e '/^.define ETCSCREENRC/s/^.*"\([^"]*\)"/\1/p'`
  21.  
  22. CC = @CC@
  23. CFLAGS = -O
  24. LDFLAGS =
  25. LIBS = @LIBS@
  26.  
  27. CPP_DEPEND=/lib/cpp -MM
  28.  
  29. INSTALL = @INSTALL@
  30. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  31. INSTALL_DATA = @INSTALL_DATA@
  32.  
  33. AWK = @AWK@
  34.  
  35. ### Chose some debug configuration options:
  36. # -DDEBUG
  37. #    Turn on really heavy debug output. This is written to 
  38. #    /tmp/debug/screen.{front,back} Look at these files and quote 
  39. #    questionable sections when sending bug-reports to the author.
  40. # -DTMPTEST
  41. #    Change the socket directory to a location that does not interfere
  42. #    with the (suid-root) installed screen version. Use that in
  43. #    combination with -DDEBUG
  44. # -DDUMPSHADOW
  45. #    With shadow-pw screen would never dump core. Use this option if you
  46. #    still want to have a core. Use only for debugging.
  47. # -DFORKDEBUG
  48. #    Swap roles of father and son when forking the SCREEN process. 
  49. #    Useful only for debugging.
  50. OPTIONS=
  51. #OPTIONS= -DDEBUG -DTMPTEST
  52.  
  53.  
  54. ######
  55. ######
  56. ###### The following lines should be obsolete because of the 'configure' script.
  57. ######
  58. ######
  59.  
  60.  
  61. ### If you choose to compile with the tried and true:
  62. #CC= cc
  63. #CFLAGS= -O
  64. #CFLAGS= -g 
  65. ### gcc specific CFLAGS:
  66. #CC= gcc
  67. # If your system include files are bad, don't use -Wall
  68. #CFLAGS= -O6 -g #-Wall 
  69. #CFLAGS = -g -fstrength-reduce -fcombine-regs -finline-functions #-Wall
  70.  
  71. ### On some machines special CFLAGS are required:
  72. #M_CFLAGS=
  73. #M_CFLAGS= -Dapollo -A cpu,mathchip -A nansi    # Apollo DN3000/4000/4500
  74. #M_CFLAGS= -DBSDI                # bsd386
  75. #M_CFLAGS= -DISC -D_POSIX_SOURCE        # isc
  76. #M_CFLAGS= -systype bsd43 -DMIPS        # mips
  77. #M_CFLAGS= -fforce-mem -fforce-addr\
  78. # -fomit-frame-pointer -finline-functions -bsd     # NeXT
  79. #M_CFLAGS= -qlanglvl=ansi            # RS6000/AIX
  80. #M_CFLAGS= -qlanglvl=ansi -D_AIX32        # RS6000/AIX 3.2
  81. #M_CFLAGS= -ansi                # sgi/IRIX 3.x ansi 
  82. #M_CFLAGS= -xansi                # sgi/IRIX 4.x ext ansi 
  83. #M_CFLAGS= -YBSD                # Ultrix 4.x
  84. #M_CFLAGS= -DSVR4=1    # Bob Kline rvk@blink.att.com 80386 Unix SVR4.0
  85. #M_CFLAGS= -D_CX_UX    # Ken Beal kbeal@amber.ssd.csd.harris.com Harris CX/UX
  86.  
  87. ### Choose one of the LIBS setting below:
  88. #LIBS= -ltermcap -lc -lsocket -linet -lsec -lseq    # Sequent/ptx
  89. #LIBS= -ltermcap             # SunOS, Linux, Apollo,
  90. #                      gould_np1, NeXT, Ultrix
  91. #LIBS= -ltermcap -lelf            # SVR4
  92. #LIBS= -ltermlib -linet -lcposix    # isc
  93. #LIBS= -ltermcap -lmld            # mips (nlist is in mld)
  94. #LIBS= -ltermlib -lsun -lmld #-lc_s    # sgi/IRIX
  95. #LIBS= -lcurses                # RS6000/AIX
  96. #LIBS= -lcrypt_d -ltinfo        # sco32
  97. #LIBS= -lcrypt_i -ltinfo        # sco32
  98. #LIBS= -lcrypt -lsec            # sco322 (msilano@sra.com)
  99. #LIBS= -ltermcap -lcrypt.o -ldir -lx    # SCO XENIX 2.3.4
  100. #LIBS= -ltermcap -lcrypt -ldir -l2.3 -lx    # SCO UNIX XENIX cross dev.
  101. #LIBS= -ltermcap -lelf -lcrypt -lsocket -lnet -lnsl    # Bob Kline SVR4
  102.  
  103. ######
  104. ######
  105. ###### end of obsolete lines
  106. ######
  107. ######
  108.  
  109.  
  110. SHELL=/bin/sh
  111.  
  112. CFILES=    screen.c ansi.c fileio.c mark.c misc.c resize.c socket.c \
  113.     search.c tty.c term.c window.c utmp.c loadav.c putenv.c help.c \
  114.     termcap.c input.c attacher.c pty.c process.c display.c comm.c acl.c
  115. OFILES=    screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o \
  116.     search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \
  117.     termcap.o input.o attacher.o pty.o process.o display.o comm.o acl.o
  118.  
  119. all:    screen 
  120.  
  121. screen: $(OFILES)
  122.     $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
  123.  
  124. .c.o:
  125.     $(CC) -c $(CFLAGS) $(M_CFLAGS) $(DEFS) $(OPTIONS) $<
  126.  
  127. install_bin: screen
  128.     $(INSTALL_PROGRAM) screen $(bindir)/screen-$(VERSION)
  129.     -chown root $(bindir)/screen-$(VERSION)
  130.     -chmod 4755 $(bindir)/screen-$(VERSION)
  131.     -if [ -f $(bindir)/screen ] && [ ! -f $(bindir)/screen.old ]; then mv $(bindir)/screen $(bindir)/screen.old; fi
  132.     rm -f $(bindir)/screen
  133.     ln -s $(bindir)/screen-$(VERSION) $(bindir)/screen
  134.  
  135. install: install_bin
  136.     -$(INSTALL_DATA) etcscreenrc $(ETCSCREENRC)
  137.     -$(INSTALL_DATA) doc/screen.1 $(mandir)/man1/screen.1
  138.     -tic terminfo/screeninfo.src
  139. # Better do this by hand. E.g. under RCS...
  140. #    cat terminfo/screencap >> /etc/termcap
  141.  
  142. uninstall:
  143.     rm -f $(bindir)/screen-$(VERSION)
  144.     rm -f $(bindir)/screen
  145.     mv $(bindir)/screen.old $(bindir)/screen
  146.     rm -f $(ETCSCREENRC)
  147.     rm -f $(mandir)/man1/screen.1
  148.  
  149. shadow:
  150.     mkdir shadow;
  151.     cd shadow; ln -s ../*.[ch] ../*.in ../*.sh ../configure ../doc ../terminfo .
  152.     rm -f shadow/term.h shadow/tty.c shadow/comm.h
  153.  
  154. term.h: term.c term.sh
  155.     AWK=$(AWK) ; . ./term.sh
  156.  
  157. tty.c:    tty.sh 
  158.     sh tty.sh tty.c
  159.  
  160. comm.h: comm.c comm.sh config.h
  161.     AWK=$(AWK) ; CC="$(CC)" ; . ./comm.sh
  162.  
  163. docs:
  164.     cd doc; $(MAKE)
  165.  
  166. dvi:
  167.     cd doc; $(MAKE) dvi
  168.  
  169. info:    
  170.     cd doc; $(MAKE) info
  171.  
  172. clean celan:
  173.     rm -f $(OFILES) tty.c term.h comm.h screen
  174.  
  175. # Delete all files from the current directory that are created by 
  176. # configuring or building the program.
  177. # building of term.h/comm.h requires awk. Keep it in the distribution
  178. # we keep config.h, as this file knows where 'make dist' finds the ETCSCREENRC.
  179. distclean:    mostlyclean
  180.     rm -f screen-$(VERSION).tar screen-$(VERSION).TZ
  181.     rm -f config.status Makefile
  182.  
  183. # Delete everything from the current directory that can be
  184. # reconstructed with this Makefile.
  185. realclean:    distclean
  186.     rm -f config.h
  187.  
  188. mostlyclean:
  189.     rm -f $(OFILES) screen
  190.  
  191. TAGS: $(CFILES)
  192.     ctags $(CFILES) *.h
  193.     ctags -e $(CFILES) *.h
  194.  
  195. dist: screen-$(VERSION).tar.z
  196.  
  197. screen-$(VERSION).tar: term.h comm.h tty.c
  198.     -rm -rf dist
  199.     mkdir dist
  200.     mkdir dist/screen-$(VERSION)
  201.     ln acl.h ansi.h display.h extern.h mark.h os.h overlay.h \
  202.        patchlevel.h rcs.h screen.h window.h \
  203.        term.sh tty.sh comm.sh newsyntax \
  204.        acl.c ansi.c attacher.c comm.c display.c window.c fileio.c help.c \
  205.        input.c loadav.c mark.c misc.c process.c pty.c putenv.c \
  206.        screen.c search.c socket.c term.c termcap.c utmp.c resize.c \
  207.        ChangeLog COPYING INSTALLATION WHAT-IS-NEW \
  208.        dist/screen-$(VERSION)
  209.     ln configure.in configure dist/screen-$(VERSION)
  210.     sed -e 's/"\/local/"\/usr\/local/g' < config.h.in > dist/screen-$(VERSION)/config.h.in
  211.     sed -e 's/[     ]\/local/ \/usr\/local/g' -e 's/^CFLAGS = -g/CFLAGS = -O/' < Makefile.in > dist/screen-$(VERSION)/Makefile.in
  212.     ln term.h dist/screen-$(VERSION)/term.h.dist
  213.     ln comm.h dist/screen-$(VERSION)/comm.h.dist
  214.     ln tty.c dist/screen-$(VERSION)/tty.c.dist
  215.     mkdir dist/screen-$(VERSION)/terminfo
  216.     cd terminfo; ln 8bits README checktc.c screen-sco.mail screencap \
  217.       screeninfo.src test.txt tetris.c \
  218.       ../dist/screen-$(VERSION)/terminfo
  219.     sed -e 's/^startup/#startup/' -e 's/^autodetach/#autodetach/' < $(ETCSCREENRC) > dist/screen-$(VERSION)/etcscreenrc 
  220.     cp $(HOME)/.iscreenrc dist/screen-$(VERSION)/.iscreenrc
  221.     mkdir dist/screen-$(VERSION)/doc
  222.     ln doc/fdpat.ips dist/screen-$(VERSION)/doc/fdpat.ps
  223.     cd doc; ln Makefile readme.quick screen.1 screen.texinfo \
  224.       ../dist/screen-$(VERSION)/doc
  225.     cd dist; tar chf ../screen-$(VERSION).tar screen-$(VERSION)
  226.     rm -rf dist
  227.  
  228. screen-$(VERSION).tar.z: screen-$(VERSION).tar
  229.     gzip -f screen-$(VERSION).tar
  230.  
  231. # Perform self-tests (if any).
  232. check:
  233.  
  234. lint:
  235.     lint -I. $(CFILES)
  236.  
  237. saber:
  238.     #load $(CFLAGS) screen.c ansi.c $(LIBS)
  239.  
  240. mdepend: $(CFILES) term.h
  241.     @rm -f DEPEND ; \
  242.     for i in ${CFILES} ; do \
  243.       echo "$$i" ; \
  244.       echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\
  245.             cc -E $$i |\
  246.             grep '^# .*"\./.*\.h"' |\
  247.             sort -t'"' -u +1 -2 |\
  248.             sed -e 's/.*"\.\/\(.*\)".*/\1/'\
  249.           ` >> DEPEND ; \
  250.     done
  251.  
  252.  
  253. depend: $(CFILES) term.h
  254.     cp Makefile Makefile~
  255.     sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make
  256.     for i in $(CFILES); do echo $$i; $(CPP_DEPEND) $$i >> tmp_make; done 
  257.     mv tmp_make Makefile
  258.  
  259.  
  260. ### Dependencies:
  261. screen.o: screen.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  262.   display.h window.h patchlevel.h extern.h 
  263. ansi.o: ansi.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  264.   display.h window.h extern.h 
  265. fileio.o: fileio.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  266.   display.h window.h extern.h 
  267. mark.o: mark.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  268.   display.h window.h mark.h extern.h 
  269. misc.o: misc.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  270.   display.h window.h extern.h 
  271. resize.o: resize.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  272.   display.h window.h extern.h 
  273. socket.o: socket.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  274.   display.h window.h extern.h 
  275. search.o: search.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  276.   display.h window.h mark.h extern.h 
  277. tty.o: tty.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  278.   display.h window.h extern.h 
  279. term.o: term.c rcs.h term.h 
  280. window.o: window.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  281.   display.h window.h extern.h 
  282. utmp.o: utmp.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  283.   display.h window.h extern.h 
  284. loadav.o: loadav.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  285.   display.h window.h extern.h 
  286. putenv.o: putenv.c rcs.h config.h 
  287. help.o: help.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  288.   display.h window.h extern.h 
  289. termcap.o: termcap.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \
  290.   term.h display.h window.h extern.h 
  291. input.o: input.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  292.   display.h window.h extern.h 
  293. attacher.o: attacher.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \
  294.   term.h display.h window.h extern.h 
  295. pty.o: pty.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  296.   display.h window.h extern.h 
  297. process.o: process.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \
  298.   term.h display.h window.h extern.h 
  299. display.o: display.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \
  300.   term.h display.h window.h extern.h 
  301. comm.o: comm.c rcs.h config.h comm.h 
  302. acl.o: acl.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \
  303.   display.h window.h extern.h acl.h 
  304.