Makefile.in revision 50276
1# $Id: Makefile.in,v 1.62 1999/02/18 11:58:20 tom Exp $ 2############################################################################## 3# Copyright (c) 1998 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 <dickey@clark.net> 1996,1997 31# 32# Makefile for ncurses source code. 33# 34# This makes the following: 35# programs 36# includes 37# libraries (normal/debug/profile/shared) 38# 39# The variable 'srcdir' refers to the source-distribution, and can be set with 40# the configure script by "--srcdir=DIR". 41# 42# The rules are organized to produce the libraries for the configured models, 43# and the programs with the configured default model. 44 45# turn off _all_ suffix rules; we'll generate our own 46.SUFFIXES: 47 48SHELL = /bin/sh 49THIS = Makefile 50 51x = @PROG_EXT@ 52 53CF_MFLAGS = @cf_cv_makeflags@ 54@SET_MAKE@ 55 56MODEL = @DFT_LWR_MODEL@ 57INSTALL_PREFIX = @INSTALL_PREFIX@ 58srcdir = @srcdir@ 59prefix = @prefix@ 60exec_prefix = @exec_prefix@ 61libdir = @libdir@ 62includedir = @includedir@ 63datadir = @datadir@ 64 65ticdir = $(datadir)/terminfo 66 67INSTALL = @INSTALL@ 68INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ 69INSTALL_DATA = @INSTALL_DATA@ 70 71AR = @AR@ 72AR_OPTS = @AR_OPTS@ 73AWK = @AWK@ 74LD = @LD@ 75LN_S = @LN_S@ 76 77CC = @CC@ 78CPP = @CPP@ 79CFLAGS = @CFLAGS@ 80 81INCDIR = $(srcdir)/../include 82CPPFLAGS = -I../ncurses -I$(srcdir) @CPPFLAGS@ \ 83 -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\" 84 85CCFLAGS = $(CPPFLAGS) $(CFLAGS) 86 87HOSTCC = @BUILD_CC@ 88HOSTCCFLAGS = @CFLAGS@ $(CPPFLAGS) 89HOSTLDFLAGS = @LDFLAGS@ @LIBS@ 90 91CFLAGS_NORMAL = $(CCFLAGS) 92CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE 93CFLAGS_PROFILE = $(CCFLAGS) -pg 94CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ 95 96CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) 97 98LINK = $(CC) 99LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ 100 101SHLIB_DIRS = -L../lib -L$(libdir) 102SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@ 103TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@ 104 105MK_SHARED_LIB = @MK_SHARED_LIB@ 106 107REL_VERSION = @cf_cv_rel_version@ 108ABI_VERSION = @cf_cv_abi_version@ 109 110RANLIB = @RANLIB@ 111 112LIBRARIES = @LIBS_TO_MAKE@ 113 114LINT = @LINT@ 115LINT_OPTS = @LINT_OPTS@ 116LINT_LIBS = -lncurses @LIBS@ 117 118FALLBACK_LIST = @FALLBACK_LIST@ 119 120AUTO_SRC = \ 121 ../include/nomacros.h \ 122 ./comp_captab.c \ 123 ./expanded.c \ 124 ./fallback.c \ 125 init_keytry.h \ 126 ./lib_keyname.c \ 127 ./lib_gen.c \ 128 ./codes.c \ 129 ./names.c \ 130 ./unctrl.c 131 132TEST_DEPS = @LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ 133TEST_ARGS = -L../lib -lncurses@DFT_ARG_SUFFIX@ 134TEST_LDFLAGS = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@ 135 136TEST_PROGS = \ 137 captoinfo$x \ 138 hardscroll$x \ 139 hashmap$x \ 140 lib_mvcur$x 141 142base = $(srcdir)/base 143serial = $(srcdir)/tty 144tinfo = $(srcdir)/tinfo 145trace = $(srcdir)/trace 146 147################################################################################ 148all :: $(AUTO_SRC) ../lib $(LIBRARIES) 149 150sources: $(AUTO_SRC) 151 152$(INSTALL_PREFIX)$(libdir) : 153 $(srcdir)/../mkinstalldirs $@ 154 155../lib : ; mkdir $@ 156 157./fallback.c : $(tinfo)/MKfallback.sh 158 sh $(tinfo)/MKfallback.sh $(FALLBACK_LIST) >$@ 159 160./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h 161 sh $(base)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h >$@ 162 163../include/nomacros.h : $(base)/MKlib_gen.sh ../include/curses.h 164 sh $(base)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h | \ 165 fgrep undef >$@ 166 167init_keytry.h: make_keys$x $(tinfo)/keys.list 168 ./make_keys $(tinfo)/keys.list > $@ 169 170make_keys$x : \ 171 $(tinfo)/make_keys.c \ 172 ./names.c 173 $(HOSTCC) -o $@ $(HOSTCCFLAGS) $(tinfo)/make_keys.c $(HOSTLDFLAGS) 174 175make_hash$x : \ 176 $(tinfo)/comp_hash.c \ 177 ../include/hashsize.h 178 $(HOSTCC) -o $@ $(HOSTCCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(HOSTLDFLAGS) 179 180./expanded.c : $(serial)/MKexpanded.sh 181 sh $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@ 182 183./comp_captab.c: \ 184 make_hash$x \ 185 ../include/hashsize.h \ 186 $(tinfo)/MKcaptab.awk 187 sh $(tinfo)/MKcaptab.awk $(AWK) $(srcdir)/../include/Caps > $@ 188 189./lib_keyname.c: $(tinfo)/keys.list $(base)/MKkeyname.awk 190 $(AWK) -f $(base)/MKkeyname.awk $(tinfo)/keys.list > $@ 191 192./names.c ./codes.c: $(tinfo)/MKnames.awk 193 $(AWK) -f $(tinfo)/MKnames.awk $(srcdir)/../include/Caps 194 cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >./names.c 195 cat namehdr boolcodes numcodes strcodes codeftr >./codes.c 196 -rm -f namehdr nameftr codeftr boolnames boolfnames boolcodes numnames numfnames numcodes strnames strfnames strcodes 197 198./unctrl.c: $(base)/MKunctrl.awk 199 echo | $(AWK) -f $(base)/MKunctrl.awk >$@ 200 201tags: 202 ctags *.[ch] 203 204TAGS: 205 etags *.[ch] 206 207mostlyclean :: 208 -rm -f core tags TAGS *~ *.ln *.atac trace 209 -rm -f $(TEST_PROGS) 210 211clean :: mostlyclean 212 -rm -f $(AUTO_SRC) 213 -rm -f make_keys 214 -rm -f make_hash 215 216distclean :: clean 217 -rm -f Makefile 218 219realclean :: distclean 220 221# These rules are used to allow "make -n" to work on a clean directory-tree 222../include/hashsize.h \ 223../include/parametrized.h \ 224../include/term.h : 225 cd ../include; $(MAKE) $(CF_MFLAGS) 226 227# These rules build test-programs for the modules that have test-drivers 228test_progs : $(TEST_PROGS) 229 230captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS) 231 @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS) 232 233hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS) 234 @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS) 235 236hashmap$x : $(serial)/hashmap.c $(TEST_DEPS) 237 @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(TEST_LDFLAGS) 238 239lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \ 240 ../@DFT_OBJ_SUBDIR@/dump_entry.o 241 @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry.o $(TEST_LDFLAGS) 242 243../@DFT_OBJ_SUBDIR@/dump_entry.o: 244 cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry.o 245 246############################################################################### 247# The remainder of this file is automatically generated during configuration 248############################################################################### 249