Makefile.in 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. # $Id: Makefile.in,v 1.80 2008/11/15 19:04:19 tom Exp $
  2. ##############################################################################
  3. # Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
  4. # #
  5. # Permission is hereby granted, free of charge, to any person obtaining a #
  6. # copy of this software and associated documentation files (the "Software"), #
  7. # to deal in the Software without restriction, including without limitation #
  8. # the rights to use, copy, modify, merge, publish, distribute, distribute #
  9. # with modifications, sublicense, and/or sell copies of the Software, and to #
  10. # permit persons to whom the Software is furnished to do so, subject to the #
  11. # following conditions: #
  12. # #
  13. # The above copyright notice and this permission notice shall be included in #
  14. # all copies or substantial portions of the Software. #
  15. # #
  16. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
  17. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
  18. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
  19. # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
  20. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
  21. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
  22. # DEALINGS IN THE SOFTWARE. #
  23. # #
  24. # Except as contained in this notice, the name(s) of the above copyright #
  25. # holders shall not be used in advertising or otherwise to promote the sale, #
  26. # use or other dealings in this Software without prior written #
  27. # authorization. #
  28. ##############################################################################
  29. #
  30. # Author: Thomas E. Dickey 1996-on
  31. #
  32. # Makefile for ncurses source code.
  33. #
  34. # This makes the ncurses utility programs.
  35. #
  36. # The variable 'srcdir' refers to the source-distribution, and can be set with
  37. # the configure script by "--srcdir=DIR".
  38. #
  39. # The rules are organized to produce the libraries for the configured models,
  40. # and the programs with the configured default model.
  41. # turn off _all_ suffix rules; we'll generate our own
  42. .SUFFIXES:
  43. SHELL = /bin/sh
  44. THIS = Makefile
  45. CF_MFLAGS = @cf_cv_makeflags@
  46. @SET_MAKE@
  47. x = @EXEEXT@
  48. o = .@OBJEXT@
  49. MODEL = ../@DFT_OBJ_SUBDIR@
  50. DESTDIR = @DESTDIR@
  51. top_srcdir = @top_srcdir@
  52. srcdir = @srcdir@
  53. prefix = @prefix@
  54. exec_prefix = @exec_prefix@
  55. bindir = @bindir@
  56. libdir = @libdir@
  57. includedir = @includedir@
  58. datadir = @datadir@
  59. LIBTOOL = @LIBTOOL@
  60. LIBTOOL_CLEAN = @LIB_CLEAN@
  61. LIBTOOL_COMPILE = @LIB_COMPILE@
  62. LIBTOOL_LINK = @LIB_LINK@
  63. LIBTOOL_INSTALL = @LIB_INSTALL@
  64. LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
  65. INSTALL = @INSTALL@
  66. INSTALL_PROG = @INSTALL_PROGRAM@
  67. transform = @program_transform_name@
  68. AWK = @AWK@
  69. LN_S = @LN_S@
  70. CC = @CC@
  71. CPP = @CPP@
  72. CFLAGS = @CFLAGS@
  73. INCDIR = $(top_srcdir)/include
  74. CPPFLAGS = -I../progs -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
  75. CCFLAGS = $(CPPFLAGS) $(CFLAGS)
  76. CFLAGS_LIBTOOL = $(CCFLAGS)
  77. CFLAGS_NORMAL = $(CCFLAGS)
  78. CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
  79. CFLAGS_PROFILE = $(CCFLAGS) -pg
  80. CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
  81. CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
  82. REL_VERSION = @cf_cv_rel_version@
  83. ABI_VERSION = @cf_cv_abi_version@
  84. LOCAL_LIBDIR = @top_builddir@/lib
  85. LD = @LD@
  86. LINK = @LINK_PROGS@ $(LIBTOOL_LINK)
  87. LDFLAGS = @EXTRA_LDFLAGS@ @LDFLAGS@
  88. LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
  89. LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
  90. LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
  91. LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
  92. LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
  93. LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
  94. LIBS_TIC = @LDFLAGS_STATIC@ @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
  95. LDFLAGS_TIC = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TIC)
  96. LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
  97. LDFLAGS_TINFO = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
  98. LINT = @LINT@
  99. LINT_OPTS = @LINT_OPTS@
  100. LINT_LIBS = -lncurses @LIBS@
  101. AUTO_SRC = \
  102. termsort.c \
  103. transform.h
  104. # tic relies on direct access to the terminfo database
  105. GET_PROGS = infocmp$x clear$x tabs$x tput$x tset$x toe$x
  106. PUT_PROGS = @MAKE_TERMINFO@ tic$x
  107. PROGS = $(PUT_PROGS) $(GET_PROGS)
  108. # Default library, for linking applications
  109. DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
  110. HEADER_DEPS = \
  111. ../include/curses.h \
  112. $(INCDIR)/term_entry.h \
  113. $(INCDIR)/tic.h \
  114. $(INCDIR)/nc_alloc.h
  115. ################################################################################
  116. all: $(AUTO_SRC) $(PROGS)
  117. sources: $(AUTO_SRC)
  118. install: $(AUTO_SRC) install.progs
  119. uninstall: uninstall.progs
  120. # this line simplifies the configure-script
  121. libs \
  122. install.libs \
  123. uninstall.libs:
  124. TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
  125. # transformed names for installing files
  126. actual_captoinfo = `echo captoinfo$x| $(TRANSFORM)`
  127. actual_clear = `echo clear$x| $(TRANSFORM)`
  128. actual_infocmp = `echo infocmp$x| $(TRANSFORM)`
  129. actual_infotocap = `echo infotocap$x| $(TRANSFORM)`
  130. actual_init = `echo init$x| $(TRANSFORM)`
  131. actual_reset = `echo reset$x| $(TRANSFORM)`
  132. actual_tabs = `echo tabs$x| $(TRANSFORM)`
  133. actual_tic = `echo tic$x| $(TRANSFORM)`
  134. actual_toe = `echo toe$x| $(TRANSFORM)`
  135. actual_tput = `echo tput$x| $(TRANSFORM)`
  136. actual_tset = `echo tset$x| $(TRANSFORM)`
  137. # transformed names for comparing at runtime
  138. define_captoinfo = `echo captoinfo| $(TRANSFORM)`
  139. define_infotocap = `echo infotocap| $(TRANSFORM)`
  140. define_init = `echo init| $(TRANSFORM)`
  141. define_reset = `echo reset| $(TRANSFORM)`
  142. transform.h :
  143. echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >$@
  144. echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@
  145. echo "#define PROG_RESET \"$(define_reset)\"" >>$@
  146. echo "#define PROG_INIT \"$(define_init)\"" >>$@
  147. install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
  148. @MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) tic$x $(DESTDIR)$(bindir)/$(actual_tic)
  149. @MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) toe$x $(DESTDIR)$(bindir)/$(actual_toe)
  150. @MAKE_TERMINFO@ @echo "linking $(actual_infotocap) to $(actual_tic)"
  151. @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
  152. @MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap))
  153. @MAKE_TERMINFO@ @echo "linking $(actual_captoinfo) to $(actual_tic)"
  154. @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
  155. @MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo))
  156. $(LIBTOOL_INSTALL) $(INSTALL_PROG) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp)
  157. $(LIBTOOL_INSTALL) $(INSTALL_PROG) clear$x $(DESTDIR)$(bindir)/$(actual_clear)
  158. $(LIBTOOL_INSTALL) $(INSTALL_PROG) tabs$x $(DESTDIR)$(bindir)/$(actual_tabs)
  159. $(LIBTOOL_INSTALL) $(INSTALL_PROG) tput$x $(DESTDIR)$(bindir)/$(actual_tput)
  160. $(LIBTOOL_INSTALL) $(INSTALL_PROG) tset$x $(DESTDIR)$(bindir)/$(actual_tset)
  161. @echo "linking $(actual_reset) to $(actual_tset)"
  162. -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
  163. (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset))
  164. uninstall.progs:
  165. @MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tic)
  166. @MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_toe)
  167. @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
  168. @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
  169. -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp)
  170. -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear)
  171. -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tabs)
  172. -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput)
  173. -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset)
  174. -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
  175. $(DESTDIR)$(bindir) :
  176. sh $(srcdir)/../mkdirs.sh $@
  177. #
  178. # Utilities normally built by make all start here
  179. #
  180. DEPS_TIC = \
  181. $(MODEL)/tic$o \
  182. $(MODEL)/dump_entry$o
  183. tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
  184. @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@
  185. DEPS_TOE = \
  186. $(MODEL)/toe$o
  187. toe$x: $(DEPS_TOE) $(DEPS_CURSES)
  188. @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_TIC) -o $@
  189. DEPS_CLEAR = \
  190. $(MODEL)/clear$o
  191. clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
  192. @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@
  193. DEPS_TABS = \
  194. $(MODEL)/tabs$o
  195. tabs$x: $(DEPS_TABS) $(DEPS_TABS)
  196. @ECHO_LINK@ $(LINK) $(DEPS_TABS) $(LDFLAGS_TINFO) -o $@
  197. DEPS_TPUT = \
  198. $(MODEL)/tput$o
  199. tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
  200. @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@
  201. DEPS_INFOCMP = \
  202. $(MODEL)/infocmp$o \
  203. $(MODEL)/dump_entry$o
  204. infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
  205. @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@
  206. DEPS_TSET = \
  207. $(MODEL)/tset$o
  208. tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
  209. @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
  210. termsort.c: $(srcdir)/MKtermsort.sh
  211. sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
  212. #
  213. # Utility productions start here
  214. #
  215. tags:
  216. ctags *.[ch]
  217. @MAKE_UPPER_TAGS@TAGS:
  218. @MAKE_UPPER_TAGS@ etags *.[ch]
  219. mostlyclean ::
  220. -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
  221. clean :: mostlyclean
  222. -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
  223. -rm -f $(AUTO_SRC)
  224. -rm -f $(PROGS)
  225. -rm -rf .libs
  226. distclean :: clean
  227. -rm -f Makefile
  228. realclean :: distclean
  229. # These rules are used to allow "make -n" to work on a clean directory-tree
  230. ../include/hashsize.h \
  231. ../include/parametrized.h \
  232. ../include/term.h :
  233. cd ../include; $(MAKE) $(CF_MFLAGS)
  234. $(DEPS_CURSES) :
  235. cd ../ncurses; $(MAKE) $(CF_MFLAGS)
  236. lint:
  237. @MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c $(srcdir)/dump_entry.c $(LINT_LIBS)
  238. @MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c $(srcdir)/dump_entry.c $(LINT_LIBS)
  239. $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c $(LINT_LIBS)
  240. $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
  241. $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tabs.c $(LINT_LIBS)
  242. $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c $(LINT_LIBS)
  243. $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c $(srcdir)/dump_entry.c $(LINT_LIBS)
  244. ###############################################################################
  245. # The remainder of this file is automatically generated during configuration
  246. ###############################################################################