1# 2# Makefile.raw for asedit Release 1.3 3# (C) A. Stochniol, 1993 - 1994 4# 24 June 1994 5# 6# You should use that file ONLY when you can't use xmkmf (or imake) ! 7# 8# 9# ----------------- 10# *** 1. SELECT *** 11# 12# which Motif, Xt Toolkit and X library are you using ? 13# Usually you do NOT change the 3 definitions that follows unless you use 14# extra shared libraries (in which case you would probably use "-lXm_s -lPW", 15# "-lXt_s", "-lX11_s" respectively). 16# Note that on some systems you might not need PW library at all (see below). 17# 18# If you use libraries located in non-standard tree you might define 19# my LOCAL_X_LIBDIR variable instead of specifiying the full pathname for 20# each library (see the SUN example). 21# 22 23LOCAL_X_LIBDIR = 24 25XMLIB = -lXm -lPW 26XTOOLLIB = -lXt 27XLIB = -lX11 28 29## - HP PW setup: XMLIB = -lXm -lc -lPW 30 31# Note about libPW.a: it is the Programmers Workbench library, which is 32# an ATT product not included in Berkeley systems. Hence it is not found 33# in SunOS or Ultrix. The library is needed because of regex(3) routines 34# i.e. regcmp & regex, for systems that do not have them in the libc.a. 35# If you don't have libPW.a (SunOS, Ultrix) simply don't specify "-lPW". 36# Note about PW library on HP: 37# there are some name conflicts between PW and c libraries; to prevent 38# unexpected results due to these name conflicts always search 39# libc *before* searching libPW (i.e. link using a following sequence 40# -lc -lPW) 41# 42# 43# On some systems the libaries and include files might be located 44# in quite strange places. Below there are lines that I've used to install 45# asedit on different systems around my place (you might find it helpful). 46# 47# DEC settings (to use uncomment the lines below) 48# XMLIB = /usr/lib/DXM/lib/Xm/libXm.a 49# XTOOLLIB = /usr/lib/DXM/lib/Xt/libXt.a 50# STD_INCLUDES = -I/usr/lib/DXM/lib -I/usr/lib/DXM/lib/Xt 51# 52# SUN settings (to use uncomment the lines below) 53# LOCAL_X_LIBDIR = -L/usr/local/lib 54# STD_INCLUDES = -I/usr/local/include 55 56# HP-UX 8.x settings (to use uncomment the lines below) 57# LOCAL_X_LIBDIR = -L/usr/lib/Motif1.1 -L/usr/lib/X11R4 58# STD_INCLUDES = -I/usr/include/Motif1.1 -I/usr/include/X11R4 59# 60# for SUN with X11R4 and Motif 1.1.4 I had to declare additionally 61# Xext and m (mathematical) libraries ... 62# XLIB = -lXext -lX11 -lm 63 64 65# XMULIB library is only needed for X11R4 and X11R5 versions !! 66# (for X11R3 the following line that defines XMULIB should be commented 67# or defined as an empty string !) 68 69XMULIB = -lXmu 70 71SYS_LIBRARIES = $(LOCAL_X_LIBDIR) $(XMLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) 72 73 74# ----------------------------------------------------- 75# *** 2. DEFINE *** backup file suffix (default: .bak ) 76# (it might be overriden by the user using asedit backupFileSuffix X resource) 77# 78 79Backup_file_suffix = .bak 80 81 82 83# ---------------------------------- 84# *** 3. WHERE *** to install asedit 85# 86# If you install contributed X applications in their standard place you do 87# NOT have to change the default definitions for BINDIR, XAPPLOADDIR, MANDIR 88# and LIBDIR. But if you would like to install asedit somewhere else 89# you change the lines that defines those names and explicitly 90# define appropriate directories (bear in mind that what is currently written 91# are the most often used X-Window defaults obtained after applying standard 92# X11 templates, i.e. they might be different on your system). 93# BINDIR - defines where the executables are installed 94# XAPPLOADDIR - defines where the app defaults files are installed 95# MANDIR - defines where the man pages are installed (n-suffix assumed) 96# LIBDIR - defines where the help file(s), etc. are installed 97# 98# Note: for the international Release we redefine XAPPLOADDIR to take 99# into account the INST_LANG environment variable! This allow us installing 100# multiple language versions with a single Makefile. 101# If the INST_LANG is not defined the default appdefs will be taken and they 102# will be installed in a standard place (*without* LANG prefix). Set this 103# variable when you call Makefile, if necessary. 104 105 106BINDIR = /usr/bin/X11 107MANDIR = /usr/man/mann 108LIBDIR = /usr/lib/X11 109XAPPLOADDIR = ${LIBDIR}/${INST_LANG}/app-defaults 110 111# The main application defaults file ... 112# 113 114AD_FILE = ./${INST_LANG}/Asedit 115 116 117 118# ------------------------------------------------------------------- 119# *** 4. SPECIFY **** where do you want the help file to be installed 120# (it might be overriden by the user using asedit helpDir X resource) 121# 122 123Help_dir = ${LIBDIR} 124 125 126# 127# -------------------------------------------------------------------- 128# *** 5. TUNE **** specifically to your system if something goes wrong 129# 130# 131# you might need to increase the String literal space for asedit.c compilation: if 132# it is needed (because of the fallbacks), simply uncomment one of the STRING_INC 133# lines below. 134 135# (SGI & DEC) STRING_INC = -Wf,-XNl4096 136# (HP-UX ?) STRING_INC = -Wp,-H50000 137 138 139# If you find that prototypes are not supported on your system 140# (non ANSI C, vanilla SUN, etc.) then uncomment the next line 141# that defines No_proto_def 142# 143# No_proto_def = -D_NO_PROTO 144 145# 146# If you find that MAXPATHLEN is not defined then uncomment the next line 147# No_maxpathlen_def = -DMAXPATHLEN=1024 148 149# Do NOT read this paragraph unless you have buggy Motif 1.1 implementation. 150# I have used a focusCallback to set focus to a text widget inside prompt 151# dialogs (& inside other dialogs) when the dialog is first managed. 152# UNFORTUNATELY this trick corrupts the dialog callback list on ONE computer. 153# It is a DEC running X11R4 and Motif 1.1. So I think it might be a bug. 154# The corruption happens when you manage a dialog (for example Search/Go to line..) 155# & set a focus to the dialog, next take away the focus & next set a focus 156# to the dialog (using for example a pointer). At that stage the program 157# blows up ! I've tried different ways to get around that problem and preserve 158# setting the focus to the text widget but I've failed. So if you get such 159# a problem the only work around is to define XFOCUS_BUG and rebuild asedit 160# (but you won't get the text widget focused when you first manage dialogs! 161# Define xfocus_bug as -DXFOCUS_BUG below). 162# xfocus_bug = -DXFOCUS_BUG 163# 164 165## For HP-UX 8.x add in the DEFINES line the following extra element: 166## -Aa -D_HP_UX_SOURCE 167## For IBM RS/6000 with AIX 3.2.5 you might add extra memory for optimizations 168## as in the following line: 169## -qmaxmem=4000 170 171 172 DEFINES = $(No_proto_def) $(No_maxpathlen_def) $(xfocus_bug) 173 174 175# 176# END of customisation part of the Makefile 177# 178 179 180 SRCS = asedit.c as_menuh.c file_rw.c clipbrd.c \ 181 write_l.c find_pos.c asutil.c undo.c ht_help.c mk_asdat.c\ 182 file_dlg.c file_act.c srch_dlg.c srch_act.c editarea.c\ 183 calc_lc.c exec_cmd.c tool_dlg.c 184 185 OBJS = asedit.o as_menuh.o file_rw.o clipbrd.o \ 186 write_l.o find_pos.o asutil.o undo.o ht_help.o mk_asdat.o\ 187 file_dlg.o file_act.o srch_dlg.o srch_act.o editarea.o\ 188 calc_lc.o exec_cmd.o tool_dlg.o 189 190 191# asedit dependencies ..... 192 193asedit.o : asedit.h clipbrd.h machine.h xresrc.h asedit.ico Asedit.ad.h version.h 194 195as_menuh.o: asedit.h 196asutil.o: asedit.h asedit.ico 197editarea.o: asedit.h 198file_act.o: asedit.h 199file_dlg.o: asedit.h 200file_rw.o: asedit.h 201ht_help.o: asedit.h 202mk_asdat.o: asedit.h 203srch_act.o: asedit.h 204srch_dlg.o: asedit.h 205undo.o: asedit.h 206calc_lc.o: asedit.h 207exec_cmd.o: asedit.h 208tool_dlg.o: asedit.h 209 210 211clipbrd.o : clipbrd.h 212 213 214 215# 216# A rule to convert the X resource file into C declarations, 217# appropriate for inclusion as fallback resources. 218# The following rule ensures that asedit always has the latest version of its 219# resources compiled into the executable. 220# 221# Note: SUN's make doesn't like extended AD_FILE definition with INST_LANG 222# (so we replace the following Asedit.ad.h dependence with a simpler one 223# in the free release; you might restore the original if you want) 224# 225# (orig. see above) Asedit.ad.h: ${AD_FILE}.ad Makefile 226 227Asedit.ad.h: Makefile 228 ./ad2c.scr ${AD_FILE}.ad > Asedit.ad.h 229 230# Definition of some standard programs and flags 231 232 RM = rm -f 233 CC = cc 234 INSTALL = /usr/ucb/install 235 CFLAGS = $(DEFINES) ${STD_INCLUDES} 236 237 238 239.c.o: 240 $(RM) $@ 241 $(CC) -c $(CFLAGS) $*.c 242 243asedit.o: Makefile 244 $(RM) $@ 245 $(CC) -c $(CFLAGS) ${STRING_INC} $*.c 246 247ht_help.o: Makefile 248 $(RM) $@ 249 $(CC) -c $(CFLAGS) -DHELPDIR=\"${Help_dir}\" $*.c 250 251file_rw.o: Makefile 252 $(RM) $@ 253 $(CC) -c $(CFLAGS) -DBACKUP_FILE_SUFFIX=\"${Backup_file_suffix}\" $*.c 254 255 PROGRAM = asedit 256 257all:: asedit 258 259asedit: $(OBJS) 260 $(RM) $@ 261 $(CC) -o $@ $(OBJS) $(SYS_LIBRARIES) 262 263install:: asedit 264 $(INSTALL) -m 0755 asedit $(BINDIR) 265 266install.man:: asedit.man 267 $(INSTALL) -c -m 0444 asedit.man $(MANDIR)/asedit.n 268 269clean:: 270 $(RM) $(PROGRAM) 271 272all:: asedit 273 274# 275# Install the application default files (version related!) 276# 277 278install:: $(AD_FILE).ad 279 $(INSTALL) -c -m 0444 $(AD_FILE).ad $(DESTDIR)$(XAPPLOADDIR)/Asedit 280 281 $(INSTALL) -c -m 0444 ./${INST_LANG}/Asedit-sgi.ad $(DESTDIR)$(XAPPLOADDIR)/Asedit-sgi 282 283 $(INSTALL) -c -m 0444 ./${INST_LANG}/Asedit_em.ad $(DESTDIR)$(XAPPLOADDIR)/Asedit_em 284 $(INSTALL) -c -m 0444 ./${INST_LANG}/Asedit_em-sgi.ad $(DESTDIR)$(XAPPLOADDIR)/Asedit_em-sgi 285 286 287# Install the help files 288 289install:: asedit.hlp 290 $(INSTALL) -c -m 0444 asedit.hlp ${Help_dir} 291 $(INSTALL) -c -m 0444 asedit_em.hlp ${Help_dir} 292 293# That's it ! 294 295