1# 2# Author: William Chia-Wei Cheng (bill.cheng@acm.org) 3# 4# Copyright (C) 2001-2009, William Chia-Wei Cheng. 5# 6# This file may be distributed under the terms of the Q Public License 7# as defined by Trolltech AS of Norway and appearing in the file 8# LICENSE.QPL included in the packaging of this file. 9# 10# THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 11# THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12# PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 13# INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 14# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 15# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 16# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17# 18# @(#)$Header: /mm2/home/cvs/bc-src/tgif/Makefile.noimake,v 1.9 2011/05/16 16:25:17 william Exp $ 19# 20 21INSTALLPATH = /usr/local 22MANSECTION = n 23 24O = .o 25XBM = xbm/ 26 27CC = cc 28BINDIR = $(INSTALLPATH)/bin 29TGIFDIR = $(INSTALLPATH)/lib/tgif 30MANPATH = $(INSTALLPATH)/man 31MANDIR = $(MANPATH)/man$(MANSECTION) 32 33XDIR = /usr/openwin 34MOTIFDIR = /usr/dt 35INCROOT = /usr/X11R6/include 36USRLIBDIR = /usr/X11R6/lib 37 38# 39# Change INSTALL to /usr/ucb/install if INSTPGMFLAGS doesn't mean strip on 40# your machine (such as an RS6000). Stripping gets rid of 41# symbol talbe and relocation bits in a binary file. 42# 'make install' will not work with Solaris because it requires the install 43# directory right after the -c option. So, if you are running 44# Solaris, please install the files manually. 45# 46INSTALL = install 47 48CFLAGS = -O $(DEFINES) -I$(INCROOT) 49LDFLAGS = -L$(USRLIBDIR) -lc -lX11 -ldl -lm 50#################################################################### 51# Try the following instead of the above on a Solaris machine 52# 53#CFLAGS = -O $(DEFINES) -I/usr/local/include \ 54# -I$(XDIR)/include -I$(MOTIFDIR)/include 55#LDFLAGS = -L$(XDIR)/lib -L$(MOTIFDIR)/lib \ 56# -lc -lXmu -lXt -lX11 -ldl -lm -lsocket -lnsl 57#################################################################### 58# Try the following instead of the above on a AIX machine 59# 60#CFLAGS = -O $(DEFINES) -I/usr/local/include 61#LDFLAGS = -L/usr/local/lib -lc -lX11 -ldl -lm 62#################################################################### 63# Try the following instead of the above on an IRIX machine 64# 65#CFLAGS = -O2 -xansi -32 -mips2 -Wf,-XNh2000 -nostdinc \ 66# -DSYSV -DSVR4 -DFUNCPROTO=7 -DNARROWPROTO $(DEFINES) \ 67# -I/usr/local/include \ 68# -I$(XDIR)/include -I$(MOTIFDIR)/include 69#LDFLAGS = -O2 -xansi -32 -mips2 -Wf,-XNh2000 \ 70# -L$(XDIR)/lib -L$(MOTIFDIR)/lib \ 71# -lXexe -lX11 -lm -L/usr/lib/mips2 -L/usr/lib -ldl -lm 72#################################################################### 73 74########################################################################### 75# For a simple install, hopefully, you only need to change the above lines. 76########################################################################### 77 78COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS) 79LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) 80 81INSTPGMFLAGS = -s 82INSTMANFLAGS = -m 0444 83DEFINES = -DTGIF_PATH=\"$(TGIFDIR)\" -DPSFILE_MOD=0664 \ 84 -DEPSF_FILE_EXT=\"eps\" -DPS_FILE_EXT=\"ps\" \ 85 -DXBM_FILE_EXT=\"xbm\" -DXPM_FILE_EXT=\"xpm\" \ 86 -DOBJ_FILE_EXT=\"obj\" -DSYM_FILE_EXT=\"sym\" \ 87 -DTEXT_FILE_EXT=\"txt\" -DPIN_FILE_EXT=\"pin\" \ 88 -DNETLIST_FILE_EXT=\"net\" -DCOMP_FILE_EXT=\"cmp\" \ 89 -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \ 90 -DLAUNCH_ATTR=\"launch=\" -DEXEC_ATTR=\"exec=\" \ 91 -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT 92 93#-D_NO_ZLIB 94# Include the above line if you do not have zlib installed in your 95# system. Zlib is only used in tgif when _TGIF_WB2 (see below) is 96# used. 97#-D_NO_ENTER_TEXT_EVERYWHERE 98# Include the above line if you do not want to be able to enter 99# text from the keyboard in tgif unless the drawing area of tgif 100# has the keyboard focus. 101#-D_DARWIN_MOD1_AS_META 102# Include the above line if you are compiling for Mac OS X and 103# you want to use the Mod1 key as the <Meta> key. By default, 104# the Mod2 key is treated as the <Meta> key (at the time this 105# option was added). 106#-D_XPM3TOPPM 107# Include the above line if the xpmtoppm you have only knows how to 108# handle XPM format version 3. (This is the case with xpm-9.14.) 109# This has the same effect as setting Tgif.XPmOutputVersion to 3 and 110# Tgif.UseXPmVersion1ForImageMap to false. 111#-D_NO_LANDSCAPE_PDF_SETPAGEDEVICE 112# Include the above line if you want tgif to *not* generate 113# "setpagedevice" PostScript command to rotate the generated PostScript 114# file. (This is meant to be used when ps2pdf can handle landscape 115# PostScript files correctly.) 116#-D_PRTGIF_USE_ISO_LATIN_1_ALWAYS 117# Include the above line if you want to always use ISO 8859-1 character 118# set for single-byte characters when running tgif with the -print 119# commandline option. Please only use this if you are sure that you 120# will *never* use other encodings. You can selectively turn off 121# reencoding by using either the Tgif.DontReencode X default or the 122# -dontreencode commandline option. 123#-D_TMP_DIR_IN_HOME_DIR 124# Include the above line if you want the temporary directory to be 125# a user's $HOME/.Tgif directory by default. 126#-D_DONT_USE_MKTEMP 127# Include the above line if you do not want to use mktemp() and your 128# system supports tempnam(). The use of mktemp() is not recommanded 129# due to some security considerations. 130#-D_PS_SEVENBIT_DOUBLEBYTE_TEXT 131# Include the above line if bit 7 in both bytes of a double-byte 132# character should be masked out when printing/exporting double-byte 133# text to a PostScript file. 134#-D_USE_PS_ADOBE_STRING=\"true\" 135# Include the above line in the DEFINES if you want to configure tgif 136# to use a default Tgif.UsePsAdobeString value. 137#-D_MINIMAL_EPS=1 138# Include the above line in the DEFINES if you want to configure tgif 139# to use a default Tgif.MinimalEPS value. 140#-DENABLE_NLS 141# Include the above line if you want to enable NLS (Native Language 142# Support). 143#-D_DONT_USE_PORTABLE_LOCALE (obsoleted) 144# Include the above line if don't want to use the portable locale. 145# (Portable locale is "C" for all locale categories.) 146#-D_NO_RECURSIVE_EXTERN 147# Include the above line if your C compiler cannot handle 148# "#define extern extern". The /bin/cc compiler on HP-UX reports a 149# Recursion in macro "extern" when the above define is used. 150#-D_DL_EXPORT_UNDERSCORE 151# Include the above line if you use export filters and there is an entry 152# point to an export filter named "_TgifExportFilterMain" (and there's 153# no entry point named "TgifExportFilterMain"). One can see all the 154# entry points to an export filter by running 'nm' against it. 155#-D_NO_TGTWB5 156# Include the above line if you do not want to include the code 157# that handles tgtwb5. Please also remove "tgtwb5.o" and "tgtwb5xl.o" 158# from OBJ1 in Imakefile. 159#-D_NO_XCIN 160# Include the above line if you do not want to include the code 161# that handles xcin. Please also remove "cli_xcin.o" from 162# OBJ1 in Imakefile. 163#-D_NO_CHINPUT 164# Include the above line if you do not want to include the code 165# that handles chinput. Please also remove "chinput.o" from 166# OBJ1 in Imakefile. 167#-D_NO_KINPUT 168# Include the above line if you do not want to include the code 169# that handles kinput. Please also remove "convkinput.o" from 170# OBJ1 in Imakefile. 171#-D_NO_XIM 172# Include the above line if you do not want to include the code 173# that handles X Input Method. Please also remove "convxim.o" from 174# OBJ1 in Imakefile. 175#-D_NO_NKF 176# Include the above line if you do not want to include the code 177# that handles Network Kanji Filter (NKF). Please also remove 178# "nkf.o" from OBJ1 in Imakefile. 179#-D_NO_DL_SUPPORT 180# Include the above line if you don't have <dlfcn.h>. If you define 181# _NO_DL_SUPPORT, please use the SYS_LIBRARIES that does not contain 182# -ldl above. 183#-D_NO_LOCALE_SUPPORT 184# Include the above line if you don't have <X11/Xlocale.h>. If this 185# is the case and you don't have <locale.h>, you must also use 186# -D_NO_XIM because "convxim.c" assumes that you have <locale.h>. 187#-D_METRIC_PIX_PER_INCH 188# Include the above line if you want to use 127 pixels per inch 189# when printing in the metric system. If this line is not 190# included, 128 pixels per inch is used. 191#-D_NO_GETTIMEOFDAY 192# Include the above line if you do not have the gettimeofday() 193# function but have the ftime() function. 194#-D_TANGRAM_II 195# Include the above line if you want to include the Tangram-II features 196# by Carlos Fisch de Brito, Luiz Rogerio Goncalves de Carvalho, and 197# Denise Jorge de Oliveira <fisch,luiz,dezinha@land.ufrj.br> of the 198# Tangram-II team of the Universidade Federal do Rio de Janeiro. These 199# features are under development and highly experimental. 200#-D_TGIF_WB (obsoleted) 201# Include the above line if you want to include the whiteboard feature 202# by Renato Santana <renato@nce.ufrj.br>. 203#-D_TGIF_WB2 204# Include the above line if you want to include the whiteboard feature 205# by Magnos Martinello <magnos@land.ufrj.br> and Raphael S. de Moraes 206# <raphael@land.ufrj.br>. The whiteboard needs IP multicast support, 207# and therefore, can only run on IP multicast enabled kernels. This 208# code is experimental and have know bugs (such as buffer overflow) and 209# only runs on Solaris 2.6 or above or Linux 6.x or above. If you would 210# like to try it, please manipulate only small objects at this time. 211#-D_HAS_STREAMS_SUPPORT 212# Include the above line in addition to -D_TGIF_WB2 if you have the 213# /usr/include/stropts.h file (such as Solaris 2.6 or above or Linux 214# 6.x or above. 215#-DBSD_COMP 216# Include the above line if you are compiling on a Solaris (or 217# possibly an SGI) machine which requires it in <sys/ioctl.h>. 218# (If you see the error that FIONBIO is not defined when compiling 219# tcp.c, then you probably need this.) 220#-D_BACKGROUND_DONT_FORK 221# Try the above line if there are defunct tgif child processes. 222#-D_NO_LSTAT 223# Include the above line if lstat() is not available. In this case, 224# using BrowseXBitmap and BrowseXPixmap under the File Menu may cause 225# infinite loop if the directory structure is infinitely recursive. 226#-D_USE_XDRAWPOINT_TO_PUT_A_POINT 227# Include the above line if the grid points are not visible. This can 228# be used to bypass some X server bugs (such as certain Linux X server 229# using VGA16 screen) where the XDrawLine() Xlib call does not work 230# properly. 231#-D_NO_EXTERN (obsoleted) 232# Include the above line in the DEFINES if you don't want to include 233# the extern definition for functions defined in a module. For example, 234# if this option is set, then file "foo.c" will not include "foo.e", 235# and certain other extern definition in "foo.c" will be omitted. 236#-D_NO_PROTO 237# Include the above line in the DEFINES if checking for function 238# prototypes is not desired. Checking for function prototypes 239# are automatically enabled if you are using an ANSI or C++ compilor. 240# However, not all ANSI/C++ compilors are created equal. 241#-D_BSD 242# Include the above line in the DEFINES if the select() function can 243# does not be found for AIX systems (such as RS6000). Also, on AIX 244# systems, if you see garbage file names when you try to open files, 245# try this flag to make direct and dirent equivalent (in <sys/dir.h>). 246#-D_NO_RAND48 247# Include the above line in the DEFINES if you do not have the 248# srand48() or drand48() functions in your system's library. 249#-DNO_STRSTR 250# Include the above line in the DEFINES if you do not have the strstr() 251# function in your system's string library. 252#-DINVERT_CTM_BUG 253# Include the above line in the DEFINES if you are using PostScript 254# utilities which fails when trying to invert non-invertible CTM 255# (e.g., muluti.ps from ftp.ucc.su.oz.au:/pub/ps_printing/multi). 256#-DHP_LINE_BUG 257# Include the above line in the DEFINES if two-vertices horizontal and 258# verticle line segments don't draw properly on a buggy HP server. 259#-DDONTFREECOLORS 260# Include the above line in the DEFINES if you don't want the black and 261# the white colors to be freed when tgif initializes itself. You should 262# not need to do this unless you need to get around some server bugs. 263#-DUSE_XAPPLRESDIR 264# Include the above line in the DEFINES if $XAPPLRESDIR/Tgif is used to 265# specify the resource file. If your system does not have putenv() 266# (such as IBM-RT), then this won't work. 267#-DXAPPLOADDIR_DEF 268# If you define USE_XAPPLRESDIR, define this to a default directory 269# to use in case $XAPPLRESDIR isn't set. 270#-DUSE_XT_INITIALIZE 271# This will cause the XToolkit to be initialized so that the X defaults 272# are obtained from the Xt directories. This should only be used when 273# USE_XAPPLRESDIR option is NOT used. Please remember to use the 274# LOCAL_LIBRARIES with $(XTOOLLIB) $(XMULIB) above. 275#-DNO_THIN_LINE 276# Include the above line in the DEFINES if a line width of 0 causes 277# your server to crash. This is to get around a bug in some X servers. 278#-DTHIN_OVAL_AND_ARC 279# Include the above line in the DEFINES if you want 0 width arcs to 280# be used when the width of an arc is less than or equal to 1. 281# (Sun3 server has a bug that makes drawing ovals and arcs with 282# width other than 0 VERY slow). 283#-DKEEP_WHEN_PRINT 284# Include the above line in the DEFINES if you don't want the temp 285# file to be deleted after sending the print job to the printer. 286# (Some VMS systems might require this flag to be used.) 287#-DPRINT_CMD=\"lpr\" 288# Include the above line in the DEFINES if you want to configure tgif 289# to use a default print command. 290#-DNOTR4MODE 291# Include the above line in the DEFINES if you are running X11R3. 292# This will cause tgif NOT to use some X11R4 window manager related 293# functions that's not present in R3. 294#-DMAPBEFORESELECT 295# Include the above line in the DEFINES to call XMapWindow() before 296# calling XSelectInput(). This might be needed to get around some 297# server bugs. 298#-DDONT_FREE_COLORMAP 299# Include the above line in the DEFINES if you don't want the colormap 300# to be freed when tgif exits. 301#-DA4PAPER 302# Include the above line in the DEFINES if you want to print on A4 paper 303# (8.25in by 11.7in or about 21cm by 29.7cm). 304 305include make.common 306 307tgif: $(OBJS) 308# $(CC) -o tgif $(OBJS) /usr/lib/debug/malloc.o -g $(LDFLAGS) 309 $(CC) -o tgif $(OBJS) -g $(LDFLAGS) 310 311all: tgif #prtgif frontend11.o testdrive 312 @echo Making all ... 313 314prtgif: prtgif.o $(OBJ1) 315# $(CC) -o prtgif prtgif.o $(OBJ1) /usr/lib/debug/malloc.o -O $(LDFLAGS) 316 $(CC) -o prtgif prtgif.o -O $(LDFLAGS) 317 318testdrive: testdrive.o $(OBJ1) 319# $(CC) -o prtgif prtgif.o $(OBJ1) /usr/lib/debug/malloc.o -O $(LDFLAGS) 320 $(CC) -o testdrive testdrive.o $(OBJ1) -O $(LDFLAGS) 321 322frontend11.o: $(OBJ1) 323 ld -o frontend11.o -r $(OBJ1) 324 325install: $(BINDIR)/tgif $(BINDIR)/prtgif \ 326 $(TGIFDIR)/tgificon.eps $(TGIFDIR)/tgificon.obj \ 327 $(TGIFDIR)/tgificon.xbm $(TGIFDIR)/tgificon.xpm \ 328 $(TGIFDIR)/tangram.sym $(TGIFDIR)/tgif.Xdefaults \ 329 $(TGIFDIR)/keys.obj 330 @echo Making install ... 331 332$(BINDIR)/tgif: tgif 333 $(INSTALL) -c $(INSTPGMFLAGS) tgif $(BINDIR)/tgif 334 335$(BINDIR)/prtgif: prtgif 336 $(INSTALL) -c $(INSTPGMFLAGS) prtgif $(BINDIR)/prtgif 337 338$(TGIFDIR)/tgificon.eps: tgificon.eps 339 $(INSTALL) -c tgificon.eps $(TGIFDIR)/tgificon.eps 340 341$(TGIFDIR)/tgificon.obj: tgificon.obj 342 $(INSTALL) -c tgificon.obj $(TGIFDIR)/tgificon.obj 343 344$(TGIFDIR)/tgificon.xbm: tgificon.xbm 345 $(INSTALL) -c tgificon.xbm $(TGIFDIR)/tgificon.xbm 346 347$(TGIFDIR)/tgificon.xpm: tgificon.xpm 348 $(INSTALL) -c tgificon.xpm $(TGIFDIR)/tgificon.xpm 349 350$(TGIFDIR)/tangram.sym: tangram.sym 351 $(INSTALL) -c tangram.sym $(TGIFDIR)/tangram.sym 352 353$(TGIFDIR)/tgif.Xdefaults: tgif.Xdefaults 354 $(INSTALL) -c tgif.Xdefaults $(TGIFDIR)/tgif.Xdefaults 355 356$(TGIFDIR)/keys.obj: keys.obj 357 $(INSTALL) -c keys.obj $(TGIFDIR)/keys.obj 358 359install.man: $(MANDIR)/tgif.$(MANSECTION) $(MANDIR)/prtgif.$(MANSECTION) 360 @echo Making install.man ... 361 362$(MANDIR)/tgif.$(MANSECTION): tgif.man 363 $(INSTALL) -c $(INSTMANFLAGS) tgif.man $(MANDIR)/tgif.$(MANSECTION) 364 365$(MANDIR)/prtgif.$(MANSECTION): prtgif.man 366 $(INSTALL) -c $(INSTMANFLAGS) prtgif.man $(MANDIR)/prtgif.$(MANSECTION) 367 368.e.o: 369 370clean: 371 rm -f tgif prtgif *.o core 372 373include make.comdep 374