Makefile.in revision d522f475
1## $XTermId: Makefile.in,v 1.155 2008/01/05 14:26:52 tom Exp $ 2## 3## Copyright 2002-2006,2007 by Thomas E. Dickey 4## 5## All Rights Reserved 6## 7## Permission to use, copy, modify, and distribute this software and its 8## documentation for any purpose and without fee is hereby granted, 9## provided that the above copyright notice appear in all copies and that 10## both that copyright notice and this permission notice appear in 11## supporting documentation, and that the name of the above listed 12## copyright holder(s) not be used in advertising or publicity pertaining 13## to distribution of the software without specific, written prior 14## permission. 15## 16## THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD 17## TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 18## AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE 19## LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 20## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 21## ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 22## OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 23 24SHELL = /bin/sh 25 26#### Start of system configuration section. #### 27 28srcdir = @srcdir@ 29VPATH = @srcdir@ 30 31x = @EXEEXT@ 32o = .@OBJEXT@ 33 34CC = @CC@ 35CPP = @CPP@ 36AWK = @AWK@ 37LINK = $(CC) $(CFLAGS) 38 39LN_S = @LN_S@ 40RM = rm -f 41LINT = @LINT@ 42 43INSTALL = @INSTALL@ 44INSTALL_PROGRAM = @INSTALL_PROGRAM@ 45INSTALL_SCRIPT = @INSTALL_SCRIPT@ 46INSTALL_DATA = @INSTALL_DATA@ 47transform = @program_transform_name@ 48 49EXTRA_CFLAGS = @EXTRA_CFLAGS@ 50EXTRA_CPPFLAGS = @EXTRA_CPPFLAGS@ 51EXTRA_LOADFLAGS = @IMAKE_LOADFLAGS@ 52 53CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ $(EXTRA_CPPFLAGS) 54CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS) 55LDFLAGS = @LDFLAGS@ 56LIBS = @LIBS@ 57 58prefix = @prefix@ 59exec_prefix = @exec_prefix@ 60 61manext = 1 62bindir = @bindir@ 63libdir = @libdir@ 64mandir = @mandir@/man$(manext) 65appsdir = @appsdir@ 66icondir = @icondir@ 67 68#### End of system configuration section. #### 69 70DESTDIR = 71BINDIR = $(DESTDIR)$(bindir) 72LIBDIR = $(DESTDIR)$(libdir) 73MANDIR = $(DESTDIR)$(mandir) 74APPSDIR = $(DESTDIR)$(appsdir) 75ICONDIR = $(DESTDIR)$(icondir) 76 77INSTALL_DIRS = $(BINDIR) $(APPSDIR) $(ICONDIR) $(MANDIR) 78 79CLASS = XTerm 80EXTRAHDR = @EXTRAHDRS@ 81EXTRASRC = @EXTRASRCS@ 82EXTRAOBJ = @EXTRAOBJS@ 83 84 SRCS1 = button.c cachedGCs.c charproc.c charsets.c cursor.c \ 85 data.c doublechr.c fontutils.c input.c \ 86 $(MAINSRC) menu.c misc.c print.c ptydata.c \ 87 screen.c scrollbar.c tabs.c util.c xstrings.c xtermcap.c \ 88 VTPrsTbl.c $(EXTRASRC) 89 OBJS1 = button$o cachedGCs$o charproc$o charsets$o cursor$o \ 90 data$o doublechr$o fontutils$o input$o \ 91 main$o menu$o misc$o print$o ptydata$o \ 92 screen$o scrollbar$o tabs$o util$o xstrings$o xtermcap$o \ 93 VTPrsTbl$o $(EXTRAOBJ) 94 SRCS2 = resize.c xstrings.c 95 OBJS2 = resize$o xstrings$o 96 SRCS = $(SRCS1) $(SRCS2) 97 OBJS = $(OBJS1) $(OBJS2) 98 HDRS = VTparse.h data.h error.h main.h menu.h proto.h \ 99 ptyx.h version.h xstrings.h xterm.h xtermcap.h $(EXTRAHDR) 100 PROGRAMS = xterm$x resize$x 101 102all : $(PROGRAMS) 103################################################################################ 104.SUFFIXES : .i .def .hin .html .$(manext) .ms .man .ps .pdf .txt 105 106.c$o : 107@RULE_CC@ 108 @ECHO_CC@$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/$*.c 109 110.c.i : 111@RULE_CC@ 112 @ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@ 113 114.def.hin : 115 grep '^CASE_' $< | $(AWK) '{printf "#define %s %d\n", $$1, n++}' >$@ 116 117.man.$(manext) : 118 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/xterm.man $@ $(appsdir) 119 120.$(manext).html : 121 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | groff -Thtml -man" >$@ 122 123.$(manext).ps : 124 $(SHELL) -c "tbl $*.$(manext) | groff -man" >$@ 125 126.$(manext).txt : 127 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | nroff -Tascii -man | col -bx" >$@ 128 129.ms.html : 130 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.ms | groff -Thtml -ms" >$@ 131 132.ms.ps : 133 $(SHELL) -c "tbl $*.ms | groff -ms" >$@ 134 135.ms.txt : 136 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.ms | nroff -Tascii -ms | col -bx" >$@ 137 138.ps.pdf : 139 ps2pdf $*.ps 140################################################################################ 141main$o : main.h 142misc$o : version.h 143 144$(OBJS1) : xterm.h ptyx.h xtermcfg.h 145main$o resize$o screen$o : xterm_io.h 146 147xterm$x : $(OBJS1) 148 @ECHO_LD@$(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(LIBS) $(EXTRA_LOADFLAGS) 149 150resize$x : $(OBJS2) 151 @ECHO_LD@$(SHELL) $(srcdir)/plink.sh $(LINK) $(LDFLAGS) -o $@ $(OBJS2) $(LIBS) 152 153256colres.h : 154 -rm -f $@ 155 perl $(srcdir)/256colres.pl > $@ 156 15788colres.h : 158 -rm -f $@ 159 perl $(srcdir)/88colres.pl > $@ 160 161charproc$o : main.h @CHARPROC_DEPS@ 162################################################################################ 163actual_xterm = `echo xterm| sed '$(transform)'` 164actual_resize = `echo resize| sed '$(transform)'` 165actual_uxterm = `echo uxterm| sed '$(transform)'` 166actual_k8term = `echo koi8rxterm| sed '$(transform)'` 167 168binary_xterm = $(actual_xterm)$x 169binary_resize = $(actual_resize)$x 170binary_uxterm = $(actual_uxterm) 171binary_k8term = $(actual_k8term) 172 173install \ 174install-bin \ 175install-full :: xterm$x resize$x $(BINDIR) 176@MAY_SETUID@ $(SHELL) $(srcdir)/sinstall.sh @SINSTALL_OPTS@ "$(INSTALL_PROGRAM)" xterm$x @XTERM_PATH@ $(BINDIR)/$(binary_xterm) 177@NOT_SETUID@ $(INSTALL_PROGRAM) xterm$x $(BINDIR)/$(binary_xterm) 178 $(INSTALL_PROGRAM) -m 755 resize$x $(BINDIR)/$(binary_resize) 179 @$(SHELL) -c 'echo "... installing $(BINDIR)/$(binary_uxterm)"; \ 180 if test "$(binary_xterm)" != "xterm"; then \ 181 name="$(binary_xterm)"; \ 182 sed -e "s,=xterm,=$$name," $(srcdir)/uxterm >uxterm.tmp; \ 183 $(INSTALL_SCRIPT) -m 755 uxterm.tmp $(BINDIR)/$(binary_uxterm); \ 184 rm -f uxterm.tmp; \ 185 else \ 186 $(INSTALL_SCRIPT) -m 755 $(srcdir)/uxterm $(BINDIR)/$(binary_uxterm); \ 187 fi' 188 @$(SHELL) -c 'echo "... installing $(BINDIR)/$(binary_k8term)"; \ 189 if test "$(binary_xterm)" != "xterm"; then \ 190 name="$(binary_xterm)"; \ 191 sed -e "s,=xterm,=$$name," $(srcdir)/koi8rxterm >k8term.tmp; \ 192 $(INSTALL_SCRIPT) -m 755 k8term.tmp $(BINDIR)/$(binary_k8term); \ 193 rm -f k8term.tmp; \ 194 else \ 195 $(INSTALL_SCRIPT) -m 755 $(srcdir)/koi8rxterm $(BINDIR)/$(binary_k8term); \ 196 fi' 197 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && rm -f @XTERM_SYMLINK@ ; fi" 198 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && $(LN_S) $(binary_xterm) @XTERM_SYMLINK@ ; fi" 199 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && echo '... created symbolic link:' && ls -l $(binary_xterm) @XTERM_SYMLINK@ ; fi" 200 201install \ 202install-man \ 203install-full :: $(MANDIR) 204 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/xterm.man $(MANDIR)/$(actual_xterm).$(manext) $(appsdir) 205 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/resize.man $(MANDIR)/$(actual_resize).$(manext) $(appsdir) 206 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/uxterm.man $(MANDIR)/$(actual_uxterm).$(manext) $(appsdir) 207 $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/koi8rxterm.man $(MANDIR)/$(actual_k8term).$(manext) $(appsdir) 208 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && rm -f @XTERM_SYMLINK@.$(manext) ; fi" 209 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && $(LN_S) $(actual_xterm).$(manext) @XTERM_SYMLINK@.$(manext) ; fi" 210 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && echo '... created symbolic link:' && ls -l $(actual_xterm).$(manext) @XTERM_SYMLINK@.$(manext) ; fi" 211 212@no_appsdir@install \ 213@no_appsdir@install-app \ 214@no_appsdir@install-full :: $(APPSDIR) 215@no_appsdir@ @echo installing $(APPSDIR)/$(CLASS) 216@no_appsdir@ @sed -e s/XTerm/$(CLASS)/ $(srcdir)/XTerm.ad >XTerm.tmp 217@no_appsdir@ @$(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$(CLASS) 218@no_appsdir@ @echo installing $(APPSDIR)/$(CLASS)-color 219@no_appsdir@ @sed -e s/XTerm/$(CLASS)/ $(srcdir)/XTerm-col.ad >XTerm.tmp 220@no_appsdir@ @$(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$(CLASS)-color 221@no_appsdir@ @echo installing $(APPSDIR)/UXTerm 222@no_appsdir@ @sed -e s/XTerm/$(CLASS)/ $(srcdir)/UXTerm.ad >XTerm.tmp 223@no_appsdir@ @$(INSTALL_DATA) XTerm.tmp $(APPSDIR)/UXTerm 224@no_appsdir@ @echo installing $(APPSDIR)/KOI8RXTerm 225@no_appsdir@ @sed -e s/XTerm/$(CLASS)/ $(srcdir)/KOI8RXTerm.ad >XTerm.tmp 226@no_appsdir@ @$(INSTALL_DATA) XTerm.tmp $(APPSDIR)/KOI8RXTerm 227@no_appsdir@ @rm -f XTerm.tmp 228@no_icondir@ @echo "... installed app-defaults" 229 230@no_icondir@install \ 231@no_icondir@install-icon \ 232@no_icondir@install-full :: $(ICONDIR) 233@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm-color_32x32.xpm $(ICONDIR) 234@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm-color_48x48.xpm $(ICONDIR) 235@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm_32x32.xpm $(ICONDIR) 236@no_icondir@ @$(INSTALL_DATA) $(srcdir)/icons/xterm_48x48.xpm $(ICONDIR) 237@no_icondir@ @echo "... installed icons" 238 239install :: 240 @echo 'Completed installation of executables and documentation.' 241 @echo 'Use "make install-ti" to install terminfo description.' 242 243TERMINFO_DIR = @TERMINFO_DIR@ 244SET_TERMINFO = @SET_TERMINFO@ 245 246install-full \ 247install-ti :: $(TERMINFO_DIR) 248 @$(SHELL) -c "$(SET_TERMINFO) $(srcdir)/run-tic.sh $(srcdir)/terminfo" 249 @echo 'Completed installation of terminfo description.' 250 251install-full \ 252install-tc :: 253 @-$(SHELL) -c "test -f /etc/termcap && echo 'You must install the termcap entry manually by editing /etc/termcap'" 254 255installdirs : $(INSTALL_DIRS) 256################################################################################ 257uninstall \ 258uninstall-bin \ 259uninstall-full :: 260 -$(RM) $(BINDIR)/$(binary_xterm) 261 -$(RM) $(BINDIR)/$(binary_resize) 262 -$(RM) $(BINDIR)/$(binary_uxterm) 263 -$(RM) $(BINDIR)/$(binary_k8term) 264 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && rm -f @XTERM_SYMLINK@; fi" 265 266uninstall \ 267uninstall-man \ 268uninstall-full :: 269 -$(RM) $(MANDIR)/$(actual_xterm).$(manext) 270 -$(RM) $(MANDIR)/$(actual_resize).$(manext) 271 -$(RM) $(MANDIR)/$(actual_uxterm).$(manext) 272 -$(RM) $(MANDIR)/$(actual_k8term).$(manext) 273 @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && rm -f @XTERM_SYMLINK@.$(manext); fi" 274 275@no_appsdir@uninstall \ 276@no_appsdir@uninstall-app \ 277@no_appsdir@uninstall-full :: 278@no_appsdir@ -$(RM) $(APPSDIR)/$(CLASS) 279@no_appsdir@ -$(RM) $(APPSDIR)/$(CLASS)-color 280@no_appsdir@ -$(RM) $(APPSDIR)/UXTerm 281 282@no_icondir@uninstall \ 283@no_icondir@uninstall-icon \ 284@no_icondir@uninstall-full :: 285@no_icondir@ -$(RM) $(ICONDIR)/xterm-color_32x32.xpm 286@no_icondir@ -$(RM) $(ICONDIR)/xterm_32x32.xpm 287@no_icondir@ -$(RM) $(ICONDIR)/xterm-color_48x48.xpm 288@no_icondir@ -$(RM) $(ICONDIR)/xterm_48x48.xpm 289################################################################################ 290# Desktop-utils does not provide an uninstall, and is not uniformly available. 291@desktop_utils@DESKTOP_FLAGS = @DESKTOP_FLAGS@ 292@desktop_utils@install-desktop \ 293@desktop_utils@install-full :: 294@desktop_utils@ desktop-file-install $(DESKTOP_FLAGS) xterm.desktop 295@desktop_utils@ desktop-file-install $(DESKTOP_FLAGS) uxterm.desktop 296################################################################################ 297mostlyclean : 298 -$(RM) *$o *.[is] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp 299 300clean : mostlyclean 301 -$(RM) $(PROGRAMS) 302 303distclean : clean 304 -$(RM) Makefile config.status config.cache config.log xtermcfg.h 305 -$(RM) *.ps *.pdf *.png 306 -$(RM) xterm.html xterm.$(manext) xterm.txt 307 -$(RM) ctlseqs.html ctlseqs.$(manext) 308 309realclean : distclean 310 -$(RM) tags TAGS 311 312maintainer-clean : realclean 313 -$(RM) 256colres.h 88colres.h 314################################################################################ 315terminfo.out : terminfo ; tic -a -I -1 terminfo >$@ 316termcap.out : termcap ; tic -a -C -U termcap >$@ 317################################################################################ 318ctlseqs.html : ctlseqs.ms 319ctlseqs.pdf : ctlseqs.ps 320ctlseqs.ps : ctlseqs.ms 321ctlseqs.txt : ctlseqs.ms 322################################################################################ 323xterm.html : xterm.$(manext) 324xterm.pdf : xterm.ps 325xterm.ps : xterm.$(manext) 326xterm.txt : xterm.$(manext) 327################################################################################ 328lint : 329 $(LINT) $(CPPFLAGS) $(SRCS1) 330 $(LINT) $(CPPFLAGS) $(SRCS2) 331 332tags : 333 ctags $(SRCS) $(HDRS) 334 335TAGS : 336 etags $(SRCS) $(HDRS) 337 338$(TERMINFO_DIR) $(INSTALL_DIRS) : 339 $(SHELL) ${srcdir}/mkdirs.sh $@ 340 341ALWAYS : 342 343depend : $(TABLES) 344 makedepend -- $(CPPFLAGS) -- $(SRCS) 345 346# DO NOT DELETE THIS LINE -- make depend depends on it. 347