|
| 1 | +/*---------------------------------------------------------------------*/ |
| 2 | +/* Based on the Xmt.tmpl in the Xmt library, written by David Flanagan */ |
| 3 | +/* Used with permission */ |
| 4 | +/*---------------------------------------------------------------------*/ |
| 5 | +/* |
| 6 | +** Please read the comments below, and follow the directions they give. |
| 7 | +** They explain how to tailor the Help Toolkit build to work correctly at your |
| 8 | +** site, and also how to compile in workarounds for certain bugs that |
| 9 | +** appear on particular platforms. If you find bugs in the Help ToolKit once |
| 10 | +** you've compiled it, you may want to come back to this file to see if there |
| 11 | +** is a workaround for the but that you can enable, and recompile. |
| 12 | +*/ |
| 13 | + |
| 14 | +/* |
| 15 | + * These variables control the types of library that will be built. |
| 16 | + * Set them as appropriate. |
| 17 | + */ |
| 18 | +#define DoNormalLib YES |
| 19 | +#define DoSharedLib NO |
| 20 | +#define DoDebugLib NO |
| 21 | +#define DoProfileLib NO |
| 22 | + |
| 23 | + |
| 24 | +/* |
| 25 | + * Specify the type of external library support to build into XscHelp. |
| 26 | + * You must have CDE include files and libraries to build with CDE |
| 27 | + * support. You _must_ have Motif to build the XscHelp Library. |
| 28 | + */ |
| 29 | +#define XscHelpUseCDE NO |
| 30 | + |
| 31 | +/* |
| 32 | + * These variables specify where the XscHelp library and header |
| 33 | + * files will be installed. Change them if you want. |
| 34 | + * If you want to use subdirectories of your home directory, remember |
| 35 | + * that you can't use the c-shell '~' syntax here; you must use the |
| 36 | + * complete pathname of your home directory. |
| 37 | + * |
| 38 | + * The Imakefile in the clients directory will attempt to install |
| 39 | + * client programs in the standard X11 directory (/usr/bin/X11, |
| 40 | + * /usr/local/X11R5/bin/X11, or something like that.) If you want |
| 41 | + * them somewhere else, just put them there by hand. |
| 42 | + */ |
| 43 | + XSCHELP_LIBDIR = /usr/X11R6/lib |
| 44 | + XSCHELP_INCDIR = /usr/X11R6/include |
| 45 | + |
| 46 | +/* |
| 47 | + * These variables specify where the compiler should look for your |
| 48 | + * installed Motif and Xt libraries and header files. Specify |
| 49 | + * the location of your CDE, Motif and X libraries or header |
| 50 | + * using the -L or -I compiler flag, as appropriate. |
| 51 | + * |
| 52 | + * (I could figure this information out from the Motif and X template |
| 53 | + * files, but not all sites have those templates installed properly, |
| 54 | + * so XscHelp requires that you explicitly specify the information here.) |
| 55 | + */ |
| 56 | + XSCHELP_XTLIB = -L/usr/X11R6/lib |
| 57 | + XSCHELP_XTINC = -I/usr/X11R6/include |
| 58 | + XSCHELP_XMLIB = -L/usr/X11R6/lib |
| 59 | + XSCHELP_XMINC = -I/usr/X11R6/include |
| 60 | + XSCHELP_DTLIB = -L/usr/dt/lib |
| 61 | + XSCHELP_DTINC = -I/usr/dt/include |
| 62 | + |
| 63 | +/* |
| 64 | + * These variables specify the names of the various libraries |
| 65 | + * that a XscHelp application links against. These are the standard |
| 66 | + * names, but you can change them if you want to use a library |
| 67 | + * installed with a non-standard name, like Xm1.1, or XtR4, for example. |
| 68 | + * The only thing these affect is the definition of XscHelpLibs below. |
| 69 | + */ |
| 70 | +#define XscHelpLib -lXscHelp |
| 71 | +#define XscHelpDtLib -lXscCdeHelp -lDtHelp -lDtSvc -lslang |
| 72 | +#define XscHelpXmLib -lXm |
| 73 | +#define XscHelpXtLib -lXt |
| 74 | +#define XscHelpXLib -lX11 |
| 75 | + |
| 76 | +/* |
| 77 | + * Define this variable if you need to use extra libraries when linking |
| 78 | + * with Motif. Some platforms have to link with libPW.a, for example |
| 79 | + * to get the regexp() functions. |
| 80 | + */ |
| 81 | + XSCHELP_EXTRALIBS = /* eg: -lPW */ |
| 82 | + |
| 83 | + |
| 84 | +/* |
| 85 | + * If you don't like the compiler or compiler options imake uses by |
| 86 | + * default, you can set a different compiler here. Uncomment the line |
| 87 | + * below and set the compiler you want. It is probably safest, though |
| 88 | + * to use whatever compiler and options you get by default. |
| 89 | + * |
| 90 | + * Note: setting this variable will probably only work if you have X11R5 |
| 91 | + * and are not building a shared library. |
| 92 | + */ |
| 93 | +/* #define XscHelpCcCmd gcc -ansi */ |
| 94 | + |
| 95 | +/* |
| 96 | + * Don't set this variable unless you are modifying the source code |
| 97 | + */ |
| 98 | +#define XscHelpSharedLibraryRevision 1.0 |
| 99 | + |
| 100 | +/* |
| 101 | + * ====================================================================== |
| 102 | + * Don't change anything below this line |
| 103 | + * ====================================================================== |
| 104 | + */ |
| 105 | + |
| 106 | +/* |
| 107 | + * Define all the required libraries |
| 108 | + */ |
| 109 | + XSCHELP_LIB = XscHelpLib |
| 110 | + |
| 111 | +#if XscHelpUseCDE |
| 112 | + DTLIB = XscHelpDtLib |
| 113 | + DTFLAGS = -DUSE_CDE |
| 114 | +#else |
| 115 | + DTLIB = |
| 116 | + DTFLAGS = |
| 117 | +#endif |
| 118 | + XMLIB = XscHelpXmLib |
| 119 | + XTLIB = XscHelpXtLib |
| 120 | + XLIB = XscHelpXLib |
| 121 | + |
| 122 | +/* |
| 123 | + * You can (should) use this variable when you are writing Imakefiles that |
| 124 | + * include this template file. If you are using a non-standard version of |
| 125 | + * one or more libs, you can use the individual library variables directly. |
| 126 | + */ |
| 127 | +#define XscHelpLibs $(XSCHELP_LIB) $(DTLIB) $(XMLIB) $(XTLIB) $(XLIB) $(XSCHELP_EXTRALIBS) |
| 128 | + |
| 129 | +/* don't use tabs to define make variables, as some CPPs won't strip them */ |
| 130 | +#ifdef XscHelpCcCmd |
| 131 | +#undef CcCmd |
| 132 | +#define CcCmd XscHelpCcCmd |
| 133 | + CC = XscHelpCcCmd |
| 134 | +#endif |
| 135 | + |
| 136 | +/* |
| 137 | + * When compiling a file, the following variables are used in the build: |
| 138 | + * $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) |
| 139 | + * |
| 140 | + * INCLUDES should be set in a specific Imakefile for per-client |
| 141 | + * or per-library inclues. We don't set it here. |
| 142 | + * EXTRA_INCLUDES will be used for the XscHelp header files, and is set |
| 143 | + * depending on the UseInstalled variable, to build within the tree |
| 144 | + * or outside of the tree. |
| 145 | + * TOP_INCLUDES will be used for Motif and X header files. We always use |
| 146 | + * the installed headers, regardless of UseInstalled, but we do check |
| 147 | + * to see if they are installed somewhere other than /usr/include |
| 148 | + * STD_INCLUDES is for system-specific headers, set in the .cf file. |
| 149 | + * we don't mess with it here. |
| 150 | + */ |
| 151 | + TOP_INCLUDES = $(XSCHELP_DTINC) $(XSCHELP_XMINC) $(XSCHELP_XTINC) |
| 152 | + |
| 153 | +#ifndef XscHelpBuildTree |
| 154 | +#if defined(XscHelpIncDir) |
| 155 | + EXTRA_INCLUDES = -I$(XSCHELP_INCDIR) |
| 156 | +#endif |
| 157 | +#else |
| 158 | + EXTRA_INCLUDES = -I$(TOP)/include |
| 159 | +#endif |
| 160 | + |
| 161 | +/* |
| 162 | + * do pretty much the same thing for the library path. Again, |
| 163 | + * we assume that X and Motif are installed |
| 164 | + */ |
| 165 | +#ifndef XscHelpBuildTree |
| 166 | + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(XSCHELP_LIBDIR) $(XSCHELP_DTLIB) $(XSCHELP_XMLIB) $(XSCHELP_XTLIB) |
| 167 | +#else |
| 168 | + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(TOP)/src/cde -L$(TOP)/src/base $(XSCHELP_DTLIB) $(XSCHELP_XMLIB) $(XSCHELP_XTLIB) |
| 169 | +#endif |
| 170 | + |
| 171 | +/* |
| 172 | + * The XscHelpBuildTree variable says that this build is done relative to |
| 173 | + * the XscHelp tree, not installed XscHelp. When set, we must propagate this |
| 174 | + * flag to any subdirs |
| 175 | + */ |
| 176 | +#ifdef XscHelpBuildTree |
| 177 | + IMAKE_CMD = imake -DUseInstalled -DXscHelpBuildTree -I$(IRULESRC) |
| 178 | +#endif |
| 179 | + |
| 180 | +/* |
| 181 | + * defines to be passed to the compiler are a lot like include paths: |
| 182 | + * SYS_DEFINES for the .cf file |
| 183 | + * DEFINES for the Imakefile itself, but we'll use it here. |
| 184 | + * |
| 185 | + * If there are any general defines we need to pass to any XscHelp source |
| 186 | + * file or client, we'll set them here. |
| 187 | + */ |
| 188 | + DEFINES = $(DTFLAGS) |
| 189 | + |
| 190 | + |
| 191 | +/* |
| 192 | + * The following are some things used in the Imakefiles for XscHelp |
| 193 | + * that were added to the imake system in X11R5. We define them |
| 194 | + * here if needed, so that XscHelp will build with X11R4 imake config files. |
| 195 | + */ |
| 196 | +#ifndef XCOMM |
| 197 | +#define XCOMM # |
| 198 | +#endif |
0 commit comments