1238106Sdes# $Id: makefile.in,v 1.87 2013/09/02 19:51:58 tom Exp $ 2238106Sdes# template makefile for DIALOG 3238106Sdes############################################################################## 4238106Sdes# Copyright (c) 1999-2012,2013 Thomas E. Dickey # 5238106Sdes# # 6285206Sdes# Permission is hereby granted, free of charge, to any person obtaining a # 7285206Sdes# copy of this software and associated documentation files (the "Software"), # 8285206Sdes# to deal in the Software without restriction, including without limitation # 9238106Sdes# the rights to use, copy, modify, merge, publish, distribute, distribute # 10238106Sdes# with modifications, sublicense, and/or sell copies of the Software, and to # 11238106Sdes# permit persons to whom the Software is furnished to do so, subject to the # 12238106Sdes# following conditions: # 13238106Sdes# # 14238106Sdes# The above copyright notice and this permission notice shall be included in # 15238106Sdes# all copies or substantial portions of the Software. # 16238106Sdes# # 17238106Sdes# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # 18238106Sdes# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # 19285206Sdes# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # 20285206Sdes# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # 21285206Sdes# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # 22238106Sdes# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # 23238106Sdes# DEALINGS IN THE SOFTWARE. # 24238106Sdes# # 25238106Sdes# Except as contained in this notice, the name(s) of the above copyright # 26238106Sdes# holders shall not be used in advertising or otherwise to promote the sale, # 27238106Sdes# use or other dealings in this Software without prior written # 28238106Sdes# authorization. # 29238106Sdes############################################################################## 30285206Sdes# 31285206SdesSHELL = /bin/sh 32285206Sdes 33285206Sdessrcdir = @srcdir@ 34285206SdesVPATH = @srcdir@ 35285206Sdes 36238106Sdesprefix = @prefix@ 37238106Sdesexec_prefix = @exec_prefix@ 38238106Sdesdatarootdir = @datarootdir@ 39238106Sdes 40238106Sdestop_builddir = . 41238106Sdes 42238106Sdesx = @EXEEXT@ 43238106Sdeso = .@OBJEXT@ 44238106Sdes 45285206SdesDESTDIR = 46238106Sdes 47238106SdesTHIS = dialog 48238106Sdes 49238106SdesCFG_ROOTNAME = @CFG_ROOTNAME@ 50238106SdesHDR_ROOTNAME = @HDR_ROOTNAME@ 51238106SdesLIB_ROOTNAME = @LIB_ROOTNAME@ 52238106SdesLIB_SUFFIX = @LIB_SUFFIX@ 53238106Sdes 54238106SdesVERSION_MAJOR = @VERSION_MAJOR@ 55238106SdesVERSION_MINOR = @VERSION_MINOR@ 56238106SdesVERSION = $(VERSION_MAJOR).$(VERSION_MINOR) 57285206SdesREL_VERSION = @REL_VERSION@ 58285206SdesABI_VERSION = @ABI_VERSION@ 59285206SdesLIB_ROOTNAME = @LIB_ROOTNAME@ 60285206Sdes@SET_SHLIB_VARS@ 61285206Sdes 62285206Sdesbindir = @bindir@ 63285206Sdesincludedir = @includedir@ 64285206Sdeslibdir = @libdir@ 65238106Sdesmandir = @mandir@ 66238106Sdes 67238106SdesBINDIR = $(DESTDIR)$(bindir) 68238106SdesINCLUDEDIR = $(DESTDIR)$(includedir) 69238106SdesLIBDIR = $(DESTDIR)$(libdir) 70238106SdesMANDIR = $(DESTDIR)$(mandir) 71238106Sdes 72238106SdesMAN1DIR = $(MANDIR)/man1 73291767SdesMAN3DIR = $(MANDIR)/man3 74291767Sdes 75291767Sdes# see po/makefile 76291767Sdeslocaledir = $(prefix)/@DATADIRNAME@/locale 77238106Sdes 78238106SdesCFLAGS = @CFLAGS@ 79238106SdesCPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ @DEFS@ -DLOCALEDIR=\"$(localedir)\" 80238106SdesEXTRA_CFLAGS = @EXTRA_CFLAGS@ 81238106SdesCC = @CC@ 82238106SdesCPP = @CPP@ 83238106SdesAR = @AR@ 84238106SdesLDFLAGS = @EXTRA_LDFLAGS@ @LDFLAGS@ 85291767SdesLIBS = @LIBS@ @INTLLIBS@ 86291767SdesRANLIB = @LIB_PREP@ 87291767Sdes 88291767SdesRM = rm -f 89285206SdesLN_S = @LN_S@ 90285206SdesLINT = @LINT@ 91285206SdesLINT_OPTS = @LINT_OPTS@ 92285206Sdes 93285206SdesCTAGS = @CTAGS@ 94285206SdesETAGS = @ETAGS@ 95285206Sdes 96285206SdesLIBTOOL = @LIBTOOL@ @ECHO_LT@ 97294190SdesLIBTOOL_OPTS = @LIBTOOL_OPTS@ 98294190SdesLIBTOOL_CLEAN = @LIB_CLEAN@ 99294190SdesLIBTOOL_COMPILE = @LIB_COMPILE@ 100294190SdesLIBTOOL_CREATE = @LIB_CREATE@ 101238106SdesLIBTOOL_LINK = @LIB_LINK@ 102238106SdesLIBTOOL_INSTALL = @LIB_INSTALL@ 103238106SdesLIBTOOL_UNINSTALL = @LIB_UNINSTALL@ 104285206SdesLIBTOOL_VERSION = @LIBTOOL_VERSION@ 105285206Sdes 106285206SdesINSTALL = @INSTALL@ 107269257SdesINSTALL_PROGRAM = $(LIBTOOL_INSTALL) @INSTALL_PROGRAM@ 108269257SdesINSTALL_SCRIPT = @INSTALL_SCRIPT@ 109269257SdesINSTALL_DATA = @INSTALL_DATA@ 110269257Sdes 111269257SdesLINK = $(LIBTOOL_LINK) 112269257Sdes 113238106Sdes# The library is always named for the package, but the program can be further 114238106Sdes# renamed at install time, starting with the package name. 115238106SdesPACKAGE = @PACKAGE@ 116238106SdesACTUAL_PROG = `echo $(PACKAGE) |sed @program_transform_name@` 117238106SdesLIB_CONFIG = $(CFG_ROOTNAME)-config 118238106Sdes 119238106Sdes# The library name $(LIB) is set at configure/make time, since it is used as a 120238106Sdes# makefile target. Ditto for $(PROG). 121238106SdesLIB = @LIB_TARGET@ 122238106SdesPROG = @PACKAGE@$x 123238106Sdes# 124238106Sdes# Standard .c to .o compile line. 125238106Sdes# 126238106Sdes.SUFFIXES: .c .i $o .html .1 .3 .man .ps .pdf .txt 127238106Sdes.c.i : 128238106Sdes @RULE_CC@ 129238106Sdes @ECHO_CC@$(CPP) $(CPPFLAGS) -c $< >$@ 130238106Sdes.c$o : 131238106Sdes @RULE_CC@ 132238106Sdes @ECHO_CC@$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c $< 133238106Sdes 134238106Sdes.1.html : 135238106Sdes GROFF_NO_SGR=stupid $(SHELL) -c "tbl $< | groff -P -o0 -I$*_ -Thtml -man" >$@ 136238106Sdes 137238106Sdes.1.ps : 138238106Sdes $(SHELL) -c "tbl $< | groff -man" >$@ 139238106Sdes 140238106Sdes.1.txt : 141238106Sdes GROFF_NO_SGR=stupid $(SHELL) -c "tbl $< | nroff -Tascii -man | col -bx" >$@ 142238106Sdes 143238106Sdes.ps.pdf : 144238106Sdes ps2pdf $*.ps 145238106Sdes 146238106SdesEXTRAOBJS = @EXTRAOBJS@ 147238106SdesOBJECTS = $(EXTRAOBJS) \ 148238106Sdes argv$o \ 149249141Sdes arrows$o \ 150249141Sdes buttons$o \ 151249141Sdes checklist$o \ 152238106Sdes columns$o \ 153238106Sdes dlg_keys$o \ 154238106Sdes editbox$o \ 155238106Sdes help$o \ 156238106Sdes inputbox$o \ 157238106Sdes inputstr$o \ 158294190Sdes menubox$o \ 159294190Sdes mouse$o \ 160294190Sdes mousewget$o \ 161238106Sdes msgbox$o \ 162238106Sdes textbox$o \ 163238106Sdes ui_getc$o \ 164285206Sdes util$o \ 165285206Sdes version$o \ 166285206Sdes yesno$o 167285206Sdes 168285206SdesLIB_OBJECT = @LIB_OBJECT@ 169285206Sdes 170238106SdesSRCS = $(OBJECTS:$o=.c) 171238106SdesHDRS = \ 172238106Sdes dialog.h \ 173238106Sdes dlg_colors.h \ 174238106Sdes dlg_config.h \ 175238106Sdes dlg_keys.h 176238106Sdes 177238106SdesALL = $(LIB) $(PROG) 178238106Sdes 179238106SdesBIN_DIRS = $(BINDIR) $(MAN1DIR) 180238106SdesLIB_DIRS = $(LIBDIR) $(INCLUDEDIR) 181238106Sdes 182238106SdesPO_DIR = $(srcdir)/po 183238106Sdes 184238106Sdesall :: $(ALL) 185238106Sdes 186238106Sdes@LIBTOOL_MAKE@install :: install-lib 187238106Sdes@LIBTOOL_MAKE@uninstall :: uninstall-lib 188238106Sdes 189238106Sdes@INTLDIR_MAKE@@INTLLIBS@ : 190238106Sdes@INTLDIR_MAKE@ @echo "Building GNU gettext library..." 191238106Sdes@INTLDIR_MAKE@ @cd intl && $(MAKE) @cf_cv_makeflags@ 192238106Sdes 193238106Sdesdialog$o \ 194238106Sdes$(OBJECTS) : $(srcdir)/dialog.h $(srcdir)/dlg_keys.h dlg_config.h VERSION 195238106Sdes 196238106Sdes$(PROG)$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@ 197238106Sdes $(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(LDFLAGS) $(LIBS) 198238106Sdes 199238106Sdesclean \ 200238106Sdesdistclean \ 201238106Sdesinstall \ 202238106Sdesinstall-full \ 203238106Sdesinstall-strip \ 204238106Sdesuninstall :: 205238106Sdes @echo making $@ 206238106Sdes@INTLDIR_MAKE@ @-test -f intl/makefile && cd intl && $(MAKE) @cf_cv_makeflags@ $@ 207238106Sdes@MSG_DIR_MAKE@ @-test -f po/makefile && cd po && $(MAKE) @cf_cv_makeflags@ $@ 208238106Sdes 209238106Sdesclean :: 210238106Sdes @- $(RM) -r autom4te.cache 211238106Sdes - $(RM) *.*cov *.da *.bb *.bbg 212238106Sdes - $(LIBTOOL_CLEAN) $(RM) *.i *$o $(ALL) 213238106Sdes - $(RM) headers.sed 214238106Sdes - $(RM) *.html *.pdf *.png *.ps *.txt dialog_lib.1 215294190Sdes - $(RM) core *~ tags TAGS 216294190Sdes 217294190Sdesdistclean :: clean 218238106Sdes $(RM) intl/libintl.h intl/po2tbl.sed 219238106Sdes $(RM) makefile dlg_config.h config.cache config.log config.status 220238106Sdes $(RM) samples/install/makefile 221285206Sdes $(RM) headers-sh 222285206Sdes $(RM) dialog-config 223285206Sdes 224238106Sdesinstall :: install-bin install-man 225238106Sdes @echo "made $@" 226238106Sdes 227238106Sdesinstall-full :: install-lib install-bin install-man 228238106Sdes @echo "made $@" 229238106Sdes 230238106Sdesinstall-strip :: $(PROG) $(BINDIR) 231238106Sdes $(INSTALL_PROGRAM) -s $(PROG) $(BINDIR) 232238106Sdes 233238106Sdesuninstall :: uninstall-bin uninstall-man 234238106Sdes @echo "made $@" 235238106Sdes 236238106Sdesuninstall-full :: uninstall-bin uninstall-man uninstall-lib 237238106Sdes @echo "made $@" 238238106Sdes 239238106Sdesinstall-bin : $(PROG) $(BINDIR) 240238106Sdes $(INSTALL_PROGRAM) $(PROG) $(BINDIR)/$(ACTUAL_PROG)$x 241238106Sdes 242238106Sdesuninstall-bin : 243238106Sdes $(RM) $(BINDIR)/$(ACTUAL_PROG)$x 244238106Sdes 245294190Sdesinstall-man :: $(MAN1DIR) 246294190Sdes @ echo "** installing $(ACTUAL_PROG).1" 247294190Sdes @ $(SHELL) $(srcdir)/rename.sh \ 248249141Sdes $(srcdir)/dialog.1 \ 249249141Sdes $(MAN1DIR)/$(ACTUAL_PROG).1 \ 250249141Sdes $(ACTUAL_PROG) \ 251238106Sdes @PACKAGE@ \ 252238106Sdes $(INSTALL_DATA) 253238106Sdes 254238106Sdesuninstall-man :: 255238106Sdes $(RM) $(MAN1DIR)/$(ACTUAL_PROG).1 256238106Sdes 257238106Sdes# most users do not want/need the library, so the install rules are distinct. 258238106Sdesinstall-lib :: $(BINDIR) dialog-config 259238106Sdes @ echo "** installing config script in $(BINDIR)" 260238106Sdes @ $(INSTALL_SCRIPT) dialog-config $(BINDIR)/$(LIB_CONFIG) 261238106Sdes 262238106Sdesinstall-lib :: $(LIB_DIRS) $(LIB) headers.sed 263238106Sdes @ echo "** installing library in $(LIBDIR)" 264238106Sdes @ $(LIBTOOL_INSTALL) $(INSTALL_DATA) $(LIB) $(LIBDIR) 265238106Sdes @ echo "** installing headers in $(INCLUDEDIR)" 266238106Sdes @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dialog.h 267238106Sdes @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_colors.h 268238106Sdes @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_keys.h 269238106Sdes @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) . dlg_config.h 270238106Sdes 271238106Sdesuninstall-lib :: $(BINDIR) 272269257Sdes $(RM) $(BINDIR)/$(LIB_CONFIG) 273269257Sdes 274269257Sdesuninstall-lib :: $(LIB_DIRS) 275238106Sdes - $(LIBTOOL_UNINSTALL) $(RM) $(LIBDIR)/$(LIB) 276238106Sdes @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dialog.h 277238106Sdes @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_colors.h 278238106Sdes @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_keys.h 279238106Sdes @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) . dlg_config.h 280238106Sdes 281238106Sdesinstall-lib :: $(MAN3DIR) 282238106Sdes @ echo "** installing @PACKAGE@.3" 283238106Sdes @ $(SHELL) $(srcdir)/rename.sh \ 284238106Sdes $(srcdir)/dialog.3 \ 285238106Sdes $(MAN3DIR)/@PACKAGE@.3 \ 286238106Sdes $(ACTUAL_PROG) \ 287238106Sdes @PACKAGE@ \ 288238106Sdes $(INSTALL_DATA) 289238106Sdes 290291767Sdesuninstall-lib :: 291291767Sdes $(RM) $(MAN3DIR)/@PACKAGE@.3 292291767Sdes 293238106Sdesheaders.sed : headers-sh 294238106Sdes $(SHELL) headers-sh $(INCLUDEDIR) $(srcdir) 295238106Sdes 296238106Sdes################################################################################ 297238106SdesTOP_DOCS = \ 298238106Sdes dialog.html \ 299238106Sdes dialog.pdf \ 300238106Sdes dialog.ps \ 301238106Sdes dialog.txt 302238106Sdesdialog.html : dialog.1 303238106Sdesdialog.pdf : dialog.ps 304238106Sdesdialog.ps : dialog.1 305238106Sdesdialog.txt : dialog.1 306238106Sdes################################################################################ 307238106Sdes# rename, to use suffix-rules 308238106Sdesdialog_lib.1 : dialog.3 309238106Sdes -$(RM) $@ 310238106Sdes cp dialog.3 $@ 311238106Sdes 312238106SdesLIB_DOCS = \ 313238106Sdes dialog_lib.1 \ 314238106Sdes dialog_lib.html \ 315238106Sdes dialog_lib.pdf \ 316238106Sdes dialog_lib.ps \ 317238106Sdes dialog_lib.txt 318238106Sdesdialog_lib.html : dialog_lib.1 319238106Sdesdialog_lib.pdf : dialog_lib.ps 320238106Sdesdialog_lib.ps : dialog_lib.1 321238106Sdesdialog_lib.txt : dialog_lib.1 322238106Sdes################################################################################ 323285206Sdesdocs: $(TOP_DOCS) $(LIB_DOCS) 324285206Sdesclean-docs: 325285206Sdes -$(RM) $(TOP_DOCS) $(LIB_DOCS) 326238106Sdes################################################################################ 327238106Sdes 328238106Sdes$(MAN1DIR) \ 329238106Sdes$(MAN3DIR) \ 330238106Sdes$(BINDIR) \ 331238106Sdes$(INCLUDEDIR) \ 332238106Sdes$(LIBDIR) : ; mkdir -p $@ 333238106Sdes 334238106Sdes@MAKE_LOWER_TAGS@tags : 335238106Sdes@MAKE_LOWER_TAGS@ $(CTAGS) $(SRCS) $(HDRS) 336238106Sdes 337238106Sdes@MAKE_LOWER_TAGS@TAGS : 338238106Sdes@MAKE_LOWER_TAGS@ $(ETAGS) $(SRCS) $(HDRS) 339238106Sdes 340238106Sdesupdate-po: 341238106Sdes rsync -Lrtvz translationproject.org::tp/latest/dialog/ $(PO_DIR) 342238106Sdes test -f $(PO_DIR)/makefile && cd $(PO_DIR) && $(MAKE) $@ 343238106Sdes 344238106Sdeslint: 345238106Sdes $(LINT) $(LINT_OPTS) $(CPPFLAGS) *.c 346238106Sdes