Makefile.in revision a1f3da82
1## $XTermId: Makefile.in,v 1.175 2011/02/13 18:17:55 tom Exp $ 2# ----------------------------------------------------------------------------- 3# this file is part of xterm 4# 5# Copyright 1997-2009,2010 by Thomas E. Dickey 6# 7# All Rights Reserved 8# 9# Permission is hereby granted, free of charge, to any person obtaining a 10# copy of this software and associated documentation files (the 11# "Software"), to deal in the Software without restriction, including 12# without limitation the rights to use, copy, modify, merge, publish, 13# distribute, sublicense, and/or sell copies of the Software, and to 14# permit persons to whom the Software is furnished to do so, subject to 15# the following conditions: 16# 17# The above copyright notice and this permission notice shall be included 18# in all copies or substantial portions of the Software. 19# 20# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23# IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 24# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27# 28# Except as contained in this notice, the name(s) of the above copyright 29# holders shall not be used in advertising or otherwise to promote the 30# sale, use or other dealings in this Software without prior written 31# authorization. 32# ----------------------------------------------------------------------------- 33 34SHELL = /bin/sh 35 36#### Start of system configuration section. #### 37 38srcdir = @srcdir@ 39VPATH = @srcdir@ 40 41x = @EXEEXT@ 42o = .@OBJEXT@ 43 44CC = @CC@ 45CPP = @CPP@ 46AWK = @AWK@ 47LINK = $(CC) $(CFLAGS) 48 49CTAGS = @CTAGS@ 50ETAGS = @ETAGS@ 51 52LN_S = @LN_S@ 53RM = rm -f 54LINT = @LINT@ 55 56INSTALL = @INSTALL@ 57INSTALL_PROGRAM = @INSTALL_PROGRAM@ 58INSTALL_SCRIPT = @INSTALL_SCRIPT@ 59INSTALL_DATA = @INSTALL_DATA@ 60transform = @program_transform_name@ 61 62EXTRA_CFLAGS = @EXTRA_CFLAGS@ 63EXTRA_CPPFLAGS = @EXTRA_CPPFLAGS@ 64EXTRA_LOADFLAGS = @IMAKE_LOADFLAGS@ 65 66CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ $(EXTRA_CPPFLAGS) 67CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS) 68LDFLAGS = @LDFLAGS@ @EXTRA_LDFLAGS@ 69LIBS = @LIBS@ 70 71prefix = @prefix@ 72exec_prefix = @exec_prefix@ 73 74manext = 1 75bindir = @bindir@ 76libdir = @libdir@ 77mandir = @mandir@/man$(manext) 78appsdir = @appsdir@ 79icondir = @icondir@ 80 81#### End of system configuration section. #### 82 83DESTDIR = 84BINDIR = $(DESTDIR)$(bindir) 85LIBDIR = $(DESTDIR)$(libdir) 86MANDIR = $(DESTDIR)$(mandir) 87APPSDIR = $(DESTDIR)$(appsdir) 88ICONDIR = $(DESTDIR)$(icondir) 89 90INSTALL_DIRS = $(BINDIR) $(APPSDIR) $(ICONDIR) $(MANDIR) 91 92CLASS = XTerm 93EXTRAHDR = @EXTRAHDRS@ 94EXTRASRC = @EXTRASRCS@ 95EXTRAOBJ = @EXTRAOBJS@ 96 97 SRCS1 = button.c cachedGCs.c charproc.c charsets.c cursor.c \ 98 data.c doublechr.c fontutils.c input.c \ 99 linedata.c main.c menu.c misc.c \ 100 print.c ptydata.c scrollback.c \ 101 screen.c scrollbar.c tabs.c util.c xstrings.c xtermcap.c \ 102 VTPrsTbl.c $(EXTRASRC) 103 OBJS1 = button$o cachedGCs$o charproc$o charsets$o cursor$o \ 104 data$o doublechr$o fontutils$o input$o \ 105 linedata$o main$o menu$o misc$o \ 106 print$o ptydata$o scrollback$o \ 107 screen$o scrollbar$o tabs$o util$o xstrings$o xtermcap$o \ 108 VTPrsTbl$o $(EXTRAOBJ) 109 SRCS2 = resize.c xstrings.c 110 OBJS2 = resize$o xstrings$o 111 SRCS = $(SRCS1) $(SRCS2) 112 OBJS = $(OBJS1) $(OBJS2) 113 HDRS = VTparse.h data.h error.h main.h menu.h proto.h \ 114 ptyx.h version.h xstrings.h xterm.h xtermcap.h $(EXTRAHDR) 115 PROGRAMS = xterm$x resize$x 116 117all : $(PROGRAMS) 118################################################################################ 119.SUFFIXES : .i .def .hin .html .$(manext) .ms .man .ps .pdf .txt 120 121.c$o : 122 @RULE_CC@ 123 @ECHO_CC@$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/$*.c 124 125.c.i : 126 @RULE_CC@ 127 @ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@ 128 129.def.hin : 130 grep '^CASE_' $< | $(AWK) '{printf "#define %s %d\n", $$1, n++}' >$@ 131 132.man.$(manext) : 133 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $< $@ $(appsdir) 134 135.$(manext).html : 136 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | groff -Thtml -man" >$@ 137 138.$(manext).ps : 139 $(SHELL) -c "tbl $*.$(manext) | groff -man" >$@ 140 141.$(manext).txt : 142 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | nroff -Tascii -man | col -bx" >$@ 143 144.ms.html : 145 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.ms | groff -Thtml -ms" >$@ 146 147.ms.ps : 148 $(SHELL) -c "tbl $*.ms | groff -ms" >$@ 149 150.ms.txt : 151 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.ms | nroff -Tascii -ms | col -bx" >$@ 152 153.ps.pdf : 154 ps2pdf $*.ps 155################################################################################ 156main$o : main.h 157misc$o : version.h 158 159$(OBJS1) : xterm.h ptyx.h xtermcfg.h 160main$o resize$o screen$o : xterm_io.h 161 162xterm$x : $(OBJS1) 163 @ECHO_LD@$(SHELL) $(srcdir)/plink.sh $(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(LIBS) $(EXTRA_LOADFLAGS) 164 165resize$x : $(OBJS2) 166 @ECHO_LD@$(SHELL) $(srcdir)/plink.sh $(LINK) $(LDFLAGS) -o $@ $(OBJS2) $(LIBS) 167 168256colres.h : 169 -rm -f $@ 170 perl $(srcdir)/256colres.pl > $@ 171 17288colres.h : 173 -rm -f $@ 174 perl $(srcdir)/88colres.pl > $@ 175 176charproc$o : main.h @CHARPROC_DEPS@ 177################################################################################ 178actual_xterm = `echo xterm| sed '$(transform)'` 179actual_resize = `echo resize| sed '$(transform)'` 180actual_uxterm = `echo uxterm| sed '$(transform)'` 181actual_k8term = `echo koi8rxterm| sed '$(transform)'` 182 183binary_xterm = $(actual_xterm)$x 184binary_resize = $(actual_resize)$x 185binary_uxterm = $(actual_uxterm) 186binary_k8term = $(actual_k8term) 187 188install \ 189install-bin \ 190install-full :: xterm$x resize$x $(BINDIR) 191@MAY_SETUID@ $(SHELL) $(srcdir)/sinstall.sh @SINSTALL_OPTS@ "$(INSTALL_PROGRAM)" xterm$x @XTERM_PATH@ $(BINDIR)/$(binary_xterm) 192@NOT_SETUID@ $(INSTALL_PROGRAM) xterm$x $(BINDIR)/$(binary_xterm) 193 $(INSTALL_PROGRAM) -m 755 resize$x $(BINDIR)/$(binary_resize) 194 195install \ 196install-bin \ 197install-scripts \ 198install-full :: 199 @$(SHELL) -c "name=\"$(binary_xterm)\"; \ 200 dest=\"$(binary_uxterm)\"; \ 201 echo \"... installing $(BINDIR)/\$$dest\"; \ 202 if test \"\$$name\" != \"xterm\"; then \ 203 sed -e \"s,=xterm,=\$$name,\" $(srcdir)/uxterm >uxterm.tmp; \ 204 $(INSTALL_SCRIPT) -m 755 uxterm.tmp $(BINDIR)/\$$dest; \ 205 rm -f uxterm.tmp; \ 206 else \ 207 $(INSTALL_SCRIPT) -m 755 $(srcdir)/uxterm $(BINDIR)/\$$dest; \ 208 fi" 209 @$(SHELL) -c "name=\"$(binary_xterm)\"; \ 210 dest=\"$(binary_k8term)\"; \ 211 echo \"... installing $(BINDIR)/\$$dest\"; \ 212 if test \"\$$name\" != \"xterm\"; then \ 213 sed -e \"s,=xterm,=\$$name,\" $(srcdir)/koi8rxterm >k8term.tmp; \ 214 $(INSTALL_SCRIPT) -m 755 k8term.tmp $(BINDIR)/\$$dest; \ 215 rm -f k8term.tmp; \ 216 else \ 217 $(INSTALL_SCRIPT) -m 755 $(srcdir)/koi8rxterm $(BINDIR)/\$$dest; \ 218 fi" 219 @-$(SHELL) -c "name=\"$(binary_xterm)\"; \ 220 if test @XTERM_SYMLINK@ != NONE ; then \ 221 cd $(BINDIR) && ( \ 222 rm -f @XTERM_SYMLINK@ ; \ 223 $(LN_S) \$$name @XTERM_SYMLINK@ ; \ 224 echo \"... created symbolic link:\" ; \ 225 ls -l \$$name @XTERM_SYMLINK@ ) ; \ 226 fi" 227 228install \ 229install-man \ 230install-full :: $(MANDIR) 231 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/xterm.man $(MANDIR)/$(actual_xterm).$(manext) $(appsdir) 232 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/resize.man $(MANDIR)/$(actual_resize).$(manext) $(appsdir) 233 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/uxterm.man $(MANDIR)/$(actual_uxterm).$(manext) $(appsdir) 234 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/koi8rxterm.man $(MANDIR)/$(actual_k8term).$(manext) $(appsdir) 235 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && rm -f @XTERM_SYMLINK@.$(manext) ; fi" 236 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && $(LN_S) $(actual_xterm).$(manext) @XTERM_SYMLINK@.$(manext) ; fi" 237 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && echo '... created symbolic link:' && ls -l $(actual_xterm).$(manext) @XTERM_SYMLINK@.$(manext) ; fi" 238 239APP_NAMES = XTerm UXTerm KOI8RXTerm 240 241@no_appsdir@install \ 242@no_appsdir@install-app \ 243@no_appsdir@install-full :: $(APPSDIR) 244@no_appsdir@ @-$(SHELL) -c 'for s in $(APP_NAMES); \ 245@no_appsdir@ do \ 246@no_appsdir@ echo "** $$s"; \ 247@no_appsdir@ d=`echo $$s | sed -e s/XTerm/$(CLASS)/`; \ 248@no_appsdir@ echo installing $(APPSDIR)/$$d; \ 249@no_appsdir@ sed -e s/XTerm/$(CLASS)/ $(srcdir)/$$s.ad >XTerm.tmp; \ 250@no_appsdir@ $(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$$d; \ 251@no_appsdir@ echo installing $(APPSDIR)/$$d-color; \ 252@no_appsdir@ sed -e s/XTerm/$$d/ $(srcdir)/XTerm-col.ad >XTerm.tmp; \ 253@no_appsdir@ $(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$$d-color; \ 254@no_appsdir@ done' 255@no_appsdir@ @rm -f XTerm.tmp 256@no_icondir@ @echo "... installed app-defaults" 257 258@no_icondir@install \ 259@no_icondir@install-icon \ 260@no_icondir@install-full :: $(ICONDIR) 261@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm-color_32x32.xpm $(ICONDIR) 262@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm-color_48x48.xpm $(ICONDIR) 263@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm_32x32.xpm $(ICONDIR) 264@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm_48x48.xpm $(ICONDIR) 265@no_icondir@ @echo "... installed icons" 266 267install :: 268 @echo 'Completed installation of executables and documentation.' 269 @echo 'Use "make install-ti" to install terminfo description.' 270 271TERMINFO_DIR = @TERMINFO_DIR@ 272SET_TERMINFO = @SET_TERMINFO@ 273 274@no_ticprog@install-full \ 275@no_ticprog@install-ti :: $(TERMINFO_DIR) 276@no_ticprog@ @$(SHELL) -c "$(SET_TERMINFO) $(srcdir)/run-tic.sh $(srcdir)/terminfo" 277@no_ticprog@ @echo 'Completed installation of terminfo description.' 278 279install-full \ 280install-tc :: 281 @-$(SHELL) -c "test -f /etc/termcap && echo 'You must install the termcap entry manually by editing /etc/termcap'" 282 283installdirs : $(INSTALL_DIRS) 284################################################################################ 285uninstall \ 286uninstall-bin \ 287uninstall-full :: 288 -$(RM) $(BINDIR)/$(binary_xterm) 289 -$(RM) $(BINDIR)/$(binary_resize) 290 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && rm -f @XTERM_SYMLINK@; fi" 291 292uninstall \ 293uninstall-bin \ 294uninstall-scripts \ 295uninstall-full :: 296 -$(RM) $(BINDIR)/$(binary_uxterm) 297 -$(RM) $(BINDIR)/$(binary_k8term) 298 299uninstall \ 300uninstall-man \ 301uninstall-full :: 302 -$(RM) $(MANDIR)/$(actual_xterm).$(manext) 303 -$(RM) $(MANDIR)/$(actual_resize).$(manext) 304 -$(RM) $(MANDIR)/$(actual_uxterm).$(manext) 305 -$(RM) $(MANDIR)/$(actual_k8term).$(manext) 306 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && rm -f @XTERM_SYMLINK@.$(manext); fi" 307 308@no_appsdir@uninstall \ 309@no_appsdir@uninstall-app \ 310@no_appsdir@uninstall-full :: 311@no_appsdir@ @-$(SHELL) -c 'for s in $(APP_NAMES); \ 312@no_appsdir@ do \ 313@no_appsdir@ echo "** $$s"; \ 314@no_appsdir@ d=`echo $$s | sed -e s/XTerm/$(CLASS)/`; \ 315@no_appsdir@ echo uninstalling $(APPSDIR)/$$d; \ 316@no_appsdir@ $(RM) $(APPSDIR)/$$d; \ 317@no_appsdir@ echo uninstalling $(APPSDIR)/$$d-color; \ 318@no_appsdir@ $(RM) $(APPSDIR)/$$d-color; \ 319@no_appsdir@ done' 320 321@no_icondir@uninstall \ 322@no_icondir@uninstall-icon \ 323@no_icondir@uninstall-full :: 324@no_icondir@ -$(RM) $(ICONDIR)/xterm-color_32x32.xpm 325@no_icondir@ -$(RM) $(ICONDIR)/xterm_32x32.xpm 326@no_icondir@ -$(RM) $(ICONDIR)/xterm-color_48x48.xpm 327@no_icondir@ -$(RM) $(ICONDIR)/xterm_48x48.xpm 328################################################################################ 329# Desktop-utils does not provide an uninstall, and is not uniformly available. 330@desktop_utils@DESKTOP_FLAGS = @DESKTOP_FLAGS@ 331@desktop_utils@install-desktop \ 332@desktop_utils@install-full :: 333@desktop_utils@ desktop-file-install $(DESKTOP_FLAGS) xterm.desktop 334@desktop_utils@ desktop-file-install $(DESKTOP_FLAGS) uxterm.desktop 335################################################################################ 336mostlyclean : 337 -$(RM) *$o *.[is] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp 338 339clean : mostlyclean 340 -$(RM) $(PROGRAMS) 341 342distclean :: clean 343 -$(RM) Makefile config.status config.cache config.log xtermcfg.h 344 345distclean \ 346docs-clean :: 347 -$(RM) *.ps *.pdf *.png 348 -$(SHELL) -c 'for p in xterm resize uxterm koi8rxterm; \ 349 do \ 350 $(RM) $$p.html $$p.$(manext) $$p.txt; \ 351 done' 352 -$(RM) ctlseqs.html ctlseqs.$(manext) 353 354realclean : distclean 355 -$(RM) tags TAGS 356 357maintainer-clean : realclean 358 -$(RM) 256colres.h 88colres.h 359################################################################################ 360terminfo.out : terminfo ; tic -a -I -1 terminfo >$@ 361termcap.out : termcap ; tic -a -C -U termcap >$@ 362################################################################################ 363docs-ctlseqs \ 364docs :: ctlseqs.html \ 365 ctlseqs.pdf \ 366 ctlseqs.ps \ 367 ctlseqs.txt 368ctlseqs.html : ctlseqs.ms 369ctlseqs.pdf : ctlseqs.ps 370ctlseqs.ps : ctlseqs.ms 371ctlseqs.txt : ctlseqs.ms 372################################################################################ 373docs-resize \ 374docs :: resize.html \ 375 resize.pdf \ 376 resize.ps \ 377 resize.txt 378resize.html : resize.$(manext) 379resize.pdf : resize.ps 380resize.ps : resize.$(manext) 381resize.txt : resize.$(manext) 382################################################################################ 383docs-xterm \ 384docs :: xterm.html \ 385 xterm.pdf \ 386 xterm.ps \ 387 xterm.txt 388xterm.html : xterm.$(manext) 389xterm.pdf : xterm.ps 390xterm.ps : xterm.$(manext) 391xterm.txt : xterm.$(manext) 392################################################################################ 393docs-uxterm \ 394docs :: uxterm.html \ 395 uxterm.pdf \ 396 uxterm.ps \ 397 uxterm.txt 398uxterm.html : uxterm.$(manext) 399uxterm.pdf : uxterm.ps 400uxterm.ps : uxterm.$(manext) 401uxterm.txt : uxterm.$(manext) 402################################################################################ 403docs-koi8rxterm \ 404docs :: koi8rxterm.html \ 405 koi8rxterm.pdf \ 406 koi8rxterm.ps \ 407 koi8rxterm.txt 408koi8rxterm.html : koi8rxterm.$(manext) 409koi8rxterm.pdf : koi8rxterm.ps 410koi8rxterm.ps : koi8rxterm.$(manext) 411koi8rxterm.txt : koi8rxterm.$(manext) 412################################################################################ 413lint : 414 $(LINT) $(CPPFLAGS) $(SRCS1) 415 $(LINT) $(CPPFLAGS) $(SRCS2) 416 417tags : 418 $(CTAGS) $(SRCS) $(HDRS) 419 420TAGS : 421 $(ETAGS) $(SRCS) $(HDRS) 422 423$(TERMINFO_DIR) $(INSTALL_DIRS) : 424 mkdir -p $@ 425 426ALWAYS : 427 428depend : $(TABLES) 429 makedepend -- $(CPPFLAGS) -- $(SRCS) 430 431# DO NOT DELETE THIS LINE -- make depend depends on it. 432