# # Makefile.raw for asedit Release 1.3 # (C) A. Stochniol, 1993 - 1994 # 24 June 1994 # # You should use that file ONLY when you can't use xmkmf (or imake) ! # # # ----------------- # *** 1. SELECT *** # # which Motif, Xt Toolkit and X library are you using ? # Usually you do NOT change the 3 definitions that follows unless you use # extra shared libraries (in which case you would probably use "-lXm_s -lPW", # "-lXt_s", "-lX11_s" respectively). # Note that on some systems you might not need PW library at all (see below). # # If you use libraries located in non-standard tree you might define # my LOCAL_X_LIBDIR variable instead of specifiying the full pathname for # each library (see the SUN example). # LOCAL_X_LIBDIR = XMLIB = -lXm -lPW XTOOLLIB = -lXt XLIB = -lX11 ## - HP PW setup: XMLIB = -lXm -lc -lPW # Note about libPW.a: it is the Programmers Workbench library, which is # an ATT product not included in Berkeley systems. Hence it is not found # in SunOS or Ultrix. The library is needed because of regex(3) routines # i.e. regcmp & regex, for systems that do not have them in the libc.a. # If you don't have libPW.a (SunOS, Ultrix) simply don't specify "-lPW". # Note about PW library on HP: # there are some name conflicts between PW and c libraries; to prevent # unexpected results due to these name conflicts always search # libc *before* searching libPW (i.e. link using a following sequence # -lc -lPW) # # # On some systems the libaries and include files might be located # in quite strange places. Below there are lines that I've used to install # asedit on different systems around my place (you might find it helpful). # # DEC settings (to use uncomment the lines below) # XMLIB = /usr/lib/DXM/lib/Xm/libXm.a # XTOOLLIB = /usr/lib/DXM/lib/Xt/libXt.a # STD_INCLUDES = -I/usr/lib/DXM/lib -I/usr/lib/DXM/lib/Xt # # SUN settings (to use uncomment the lines below) # LOCAL_X_LIBDIR = -L/usr/local/lib # STD_INCLUDES = -I/usr/local/include # HP-UX 8.x settings (to use uncomment the lines below) # LOCAL_X_LIBDIR = -L/usr/lib/Motif1.1 -L/usr/lib/X11R4 # STD_INCLUDES = -I/usr/include/Motif1.1 -I/usr/include/X11R4 # # for SUN with X11R4 and Motif 1.1.4 I had to declare additionally # Xext and m (mathematical) libraries ... # XLIB = -lXext -lX11 -lm # XMULIB library is only needed for X11R4 and X11R5 versions !! # (for X11R3 the following line that defines XMULIB should be commented # or defined as an empty string !) XMULIB = -lXmu SYS_LIBRARIES = $(LOCAL_X_LIBDIR) $(XMLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) # ----------------------------------------------------- # *** 2. DEFINE *** backup file suffix (default: .bak ) # (it might be overriden by the user using asedit backupFileSuffix X resource) # Backup_file_suffix = .bak # ---------------------------------- # *** 3. WHERE *** to install asedit # # If you install contributed X applications in their standard place you do # NOT have to change the default definitions for BINDIR, XAPPLOADDIR, MANDIR # and LIBDIR. But if you would like to install asedit somewhere else # you change the lines that defines those names and explicitly # define appropriate directories (bear in mind that what is currently written # are the most often used X-Window defaults obtained after applying standard # X11 templates, i.e. they might be different on your system). # BINDIR - defines where the executables are installed # XAPPLOADDIR - defines where the app defaults files are installed # MANDIR - defines where the man pages are installed (n-suffix assumed) # LIBDIR - defines where the help file(s), etc. are installed # # Note: for the international Release we redefine XAPPLOADDIR to take # into account the INST_LANG environment variable! This allow us installing # multiple language versions with a single Makefile. # If the INST_LANG is not defined the default appdefs will be taken and they # will be installed in a standard place (*without* LANG prefix). Set this # variable when you call Makefile, if necessary. BINDIR = /usr/bin/X11 MANDIR = /usr/man/mann LIBDIR = /usr/lib/X11 XAPPLOADDIR = ${LIBDIR}/${INST_LANG}/app-defaults # The main application defaults file ... # AD_FILE = ./${INST_LANG}/Asedit # ------------------------------------------------------------------- # *** 4. SPECIFY **** where do you want the help file to be installed # (it might be overriden by the user using asedit helpDir X resource) # Help_dir = ${LIBDIR} # # -------------------------------------------------------------------- # *** 5. TUNE **** specifically to your system if something goes wrong # # # you might need to increase the String literal space for asedit.c compilation: if # it is needed (because of the fallbacks), simply uncomment one of the STRING_INC # lines below. # (SGI & DEC) STRING_INC = -Wf,-XNl4096 # (HP-UX ?) STRING_INC = -Wp,-H50000 # If you find that prototypes are not supported on your system # (non ANSI C, vanilla SUN, etc.) then uncomment the next line # that defines No_proto_def # # No_proto_def = -D_NO_PROTO # # If you find that MAXPATHLEN is not defined then uncomment the next line # No_maxpathlen_def = -DMAXPATHLEN=1024 # Do NOT read this paragraph unless you have buggy Motif 1.1 implementation. # I have used a focusCallback to set focus to a text widget inside prompt # dialogs (& inside other dialogs) when the dialog is first managed. # UNFORTUNATELY this trick corrupts the dialog callback list on ONE computer. # It is a DEC running X11R4 and Motif 1.1. So I think it might be a bug. # The corruption happens when you manage a dialog (for example Search/Go to line..) # & set a focus to the dialog, next take away the focus & next set a focus # to the dialog (using for example a pointer). At that stage the program # blows up ! I've tried different ways to get around that problem and preserve # setting the focus to the text widget but I've failed. So if you get such # a problem the only work around is to define XFOCUS_BUG and rebuild asedit # (but you won't get the text widget focused when you first manage dialogs! # Define xfocus_bug as -DXFOCUS_BUG below). # xfocus_bug = -DXFOCUS_BUG # ## For HP-UX 8.x add in the DEFINES line the following extra element: ## -Aa -D_HP_UX_SOURCE ## For IBM RS/6000 with AIX 3.2.5 you might add extra memory for optimizations ## as in the following line: ## -qmaxmem=4000 DEFINES = $(No_proto_def) $(No_maxpathlen_def) $(xfocus_bug) # # END of customisation part of the Makefile # SRCS = asedit.c as_menuh.c file_rw.c clipbrd.c \ write_l.c find_pos.c asutil.c undo.c ht_help.c mk_asdat.c\ file_dlg.c file_act.c srch_dlg.c srch_act.c editarea.c\ calc_lc.c exec_cmd.c tool_dlg.c OBJS = asedit.o as_menuh.o file_rw.o clipbrd.o \ write_l.o find_pos.o asutil.o undo.o ht_help.o mk_asdat.o\ file_dlg.o file_act.o srch_dlg.o srch_act.o editarea.o\ calc_lc.o exec_cmd.o tool_dlg.o # asedit dependencies ..... asedit.o : asedit.h clipbrd.h machine.h xresrc.h asedit.ico Asedit.ad.h version.h as_menuh.o: asedit.h asutil.o: asedit.h asedit.ico editarea.o: asedit.h file_act.o: asedit.h file_dlg.o: asedit.h file_rw.o: asedit.h ht_help.o: asedit.h mk_asdat.o: asedit.h srch_act.o: asedit.h srch_dlg.o: asedit.h undo.o: asedit.h calc_lc.o: asedit.h exec_cmd.o: asedit.h tool_dlg.o: asedit.h clipbrd.o : clipbrd.h # # A rule to convert the X resource file into C declarations, # appropriate for inclusion as fallback resources. # The following rule ensures that asedit always has the latest version of its # resources compiled into the executable. # # Note: SUN's make doesn't like extended AD_FILE definition with INST_LANG # (so we replace the following Asedit.ad.h dependence with a simpler one # in the free release; you might restore the original if you want) # # (orig. see above) Asedit.ad.h: ${AD_FILE}.ad Makefile Asedit.ad.h: Makefile ./ad2c.scr ${AD_FILE}.ad > Asedit.ad.h # Definition of some standard programs and flags RM = rm -f CC = cc INSTALL = /usr/ucb/install CFLAGS = $(DEFINES) ${STD_INCLUDES} .c.o: $(RM) $@ $(CC) -c $(CFLAGS) $*.c asedit.o: Makefile $(RM) $@ $(CC) -c $(CFLAGS) ${STRING_INC} $*.c ht_help.o: Makefile $(RM) $@ $(CC) -c $(CFLAGS) -DHELPDIR=\"${Help_dir}\" $*.c file_rw.o: Makefile $(RM) $@ $(CC) -c $(CFLAGS) -DBACKUP_FILE_SUFFIX=\"${Backup_file_suffix}\" $*.c PROGRAM = asedit all:: asedit asedit: $(OBJS) $(RM) $@ $(CC) -o $@ $(OBJS) $(SYS_LIBRARIES) install:: asedit $(INSTALL) -m 0755 asedit $(BINDIR) install.man:: asedit.man $(INSTALL) -c -m 0444 asedit.man $(MANDIR)/asedit.n clean:: $(RM) $(PROGRAM) all:: asedit # # Install the application default files (version related!) # install:: $(AD_FILE).ad $(INSTALL) -c -m 0444 $(AD_FILE).ad $(DESTDIR)$(XAPPLOADDIR)/Asedit $(INSTALL) -c -m 0444 ./${INST_LANG}/Asedit-sgi.ad $(DESTDIR)$(XAPPLOADDIR)/Asedit-sgi $(INSTALL) -c -m 0444 ./${INST_LANG}/Asedit_em.ad $(DESTDIR)$(XAPPLOADDIR)/Asedit_em $(INSTALL) -c -m 0444 ./${INST_LANG}/Asedit_em-sgi.ad $(DESTDIR)$(XAPPLOADDIR)/Asedit_em-sgi # Install the help files install:: asedit.hlp $(INSTALL) -c -m 0444 asedit.hlp ${Help_dir} $(INSTALL) -c -m 0444 asedit_em.hlp ${Help_dir} # That's it !