source: trunk/third/wcl/Wc.tmpl @ 8972

Revision 8972, 11.5 KB checked in by ghudson, 28 years ago (diff)
We just want a single straight static library, no shared or debugging library.
Line 
1#ifndef XCOMM
2#ifdef GNUCPP
3#define XCOMM \#
4#else
5#define XCOMM #
6#endif
7#endif
8
9XCOMM###########################################################################
10XCOMM# Wc.tmpl:  Makefile defines for Widget Creation Library
11XCOMM#
12XCOMM# Author:          David E. Smyth
13XCOMM# SCCS_data:       %Z% %M% %I% %E% %U%
14XCOMM###########################################################################
15
16/******************************************************************************
17** There are three sections:
18** First section:  Almost all sites must set some values.
19** Second section: A few sites must set some values.
20** Third section:  I think no sites need to set any values.
21*/
22
23
24/*#############################################################################
25**#############################################################################
26** First section:  Almost all sites must set some values.
27**#############################################################################
28**###########################################################################**/
29
30/******************************************************************************
31** Release level of your Imake, X and Xt system:
32** 30 = X11R3                                   
33** 35 = Motif 1.0 release of Xt Intrinsics
34** 40 = X11R4 where XtNameToWidget barfs on Gadgets (early patch levels)
35** 41 = X11R4 with fixed XtNameToWidget
36** 50 = X11R5
37*/
38#define XRelease 50
39
40/******************************************************************************
41** Which flavors of libraries do you need?  Shared library systems by default
42** do not build normal libraries, so you must ask for them if you need them.
43*/
44#define ForceNormalLibs YES
45#define MakeDebugLibs   NO
46#define MakeProfileLibs NO
47#define HasSharedLibraries NO
48
49/******************************************************************************
50** Widget Libraries you have available
51*/
52#define HaveAthenaWidgetSet   YES
53#define HaveMotifWidgetSet    YES
54#define HaveMotifHacks        NO
55#define HaveOpenLookWidgetSet NO
56
57/******************************************************************************
58** Special Flags for compiling files which use widget libraries
59** (Your Imake installation may take care of these flags already).
60**
61** XpLibraryOptions     cc flags passed to files using Athena widgets
62** XmpLibraryOptions    cc flags passed to files using Motif widgets
63** XopLibraryOptions    cc flags passed to files using OpenLook widgets
64** DebugClientOptions   cc flags passed to build Test.o files.  Note that
65**                      if you have debug versions of libraries which use
66**                      -DXTTRACEMEMORY then you must set this here too!
67**                      If you have XtSetDefaultFilePredicate() and
68**                      XrmTraceFiles() - but I doubt you do - then set
69**                      -DXTRACEFILEHACKS.
70*/
71#define XpLibraryOptions
72#define XmpLibraryOptions -D_NO_PROTO
73#define XopLibraryOptions -I/usr/openwin/include -I/usr/openwin/include/Xol
74#define DebugClientOptions -g -DASSERTIONS
75
76/*#############################################################################
77**#############################################################################
78** Second section: A few sites must set some values.
79**#############################################################################
80**###########################################################################**/
81
82/******************************************************************************
83** Some systems need to look in a special place to get normal libraries.
84** The only system I am aware of so far is OSF1, which has a special
85** directory for shared libraries which is different from the normal
86** (/usr/lib) location.  Maybe this will work for all OSF1 sites.
87**
88** This is appended to LDOPTIONS used to link clients built using WcClient.tmpl
89*/
90#if defined(OSF1)
91    GLOBAL_LDFLAGS = -L$(USRSHLIBDIR)
92#else
93    GLOBAL_LDFLAGS = -L$(USRLIBDIR)
94#endif
95
96/******************************************************************************
97** If your system supports dynamic linking as SVR4 or SunOS with the
98** library "dl" and the include file <dlfcn.h> and the functions
99** dlopen() and dlsym() and the macro RTLD_LAZY then you can use some
100** wizzy dynamic linking stuff.  Unfortunately, gcc does not support this.
101*/
102#if defined(SVR4) || defined(SunArchitecture) || defined(OSF1) && !HasGcc && !MakeProfileLibs
103#if HasSharedLibraries
104#define Has_dlopen_And_dlsym YES
105#endif
106#else
107#define Has_dlopen_And_dlsym NO
108#endif
109
110/******************************************************************************
111** Motif FileSelectionBox uses reg_ex or regcmp which on SVR4 is in libgen,
112** on some other machines it is in libPW.   See regcmp(3)
113*/
114#ifdef SVR4 || defined(SystemV4)
115    REGEXLIB = -lgen
116#else
117#ifdef SGIArchitecture || defined(OSF1)
118    REGEXLIB = -lPW
119#else
120    REGEXLIB =
121#endif
122#endif
123
124/******************************************************************************
125** Debug library extension: The new X11R5 standard is to append "_d" to
126** library names for the degugged versions of libraries.  Some sites use
127** the older convention of appending "_g" instead.
128*/
129#define DebugLibraryExtension _d
130
131DLX = DebugLibraryExtension
132
133/******************************************************************************
134** Normal and Debugged versions of widget and X libraries.  The values
135** "DebugLibXaw" are usually defined in Project.tmpl.  The debugged versions
136** of libraries are used to create more complete Test programs.
137*/
138#ifndef DebugLibXaw
139#define DebugLibXaw  NO
140#endif
141#ifndef DebugLibXcu
142#define DebugLibXcu  NO
143#endif
144#ifndef DebugLibXm
145#define DebugLibXm   NO
146#endif
147#ifndef DebugLibXol
148#define DebugLibXol  NO
149#endif
150#ifndef DebugLibXmu
151#define DebugLibXmu  NO
152#endif
153#ifndef DebugLibXt
154#define DebugLibXt   NO
155#endif
156#ifndef DebugLibX
157#define DebugLibX    NO
158#endif
159#ifndef DebugLibXext
160#define DebugLibXext NO
161#endif
162
163/******************************************************************************
164** You usually do not have to edit these, but you may need to provide
165** -L<libpath> before these.
166**
167** XAWLIB, XMULIB, XTOOLLIB, EXTENSIONLIB, and XLIB are defined in
168** your Imake configuration.
169*/
170#if DebugLibXaw
171  DEBUGXAWLIB = -lXaw$(DLX)
172#else
173  DEBUGXAWLIB = $(XAWLIB)
174#endif
175
176     XMLIB = -lXm $(REGEXLIB)
177#if DebugLibXm
178DEBUGXMLIB = -lXm$(DLX) $(REGEXLIB)
179#else
180DEBUGXMLIB = $(XMLIB)
181#endif
182
183     XOLLIB = -L/usr/openwin/lib -lXol
184#if DebugLibXol
185DEBUGXOLLIB = -lXol$(DLX)
186#else
187DEBUGXOLLIB = $(XOLLIB)
188#endif
189
190#if DebugLibXmu
191DEBUGXMULIB = -lXmu$(DLX)
192#else
193DEBUGXMULIB = $(XMULIB)
194#endif
195
196#if DebugLibXt
197DEBUGXTOOLLIB = -lXt$(DLX)
198#else
199DEBUGXTOOLLIB = $(XTOOLLIB)
200#endif
201
202#if DebugLibXext
203DEBUGXEXTLIB = -lXext$(DLX)
204#else
205DEBUGXEXTLIB = $(EXTENSIONLIB)
206#endif
207
208#if DebugLibX
209DEBUGXLIB = $(DEBUGXEXTLIB) -lX11$(DLX)
210#else
211DEBUGXLIB = $(DEBUGXEXTLIB) -lX11
212#endif
213
214
215/******************************************************************************
216** Only a very poorly configured system (like SCO) needs this.  If you get
217** an error like this:
218**   /usr/include/X11/Xos.h(81) : fatal error: cannot open find 'strings.h'
219** then you should set this stuff up, and/or make a link in /usr/include
220** from strings.h to string.h
221*/
222#define NeedLocal_strings_h NO
223#if NeedLocal_strings_h
224  GET_LOCAL_STRINGS_H = ln -s /usr/include/string.h ./strings.h
225/*
226  GET_LOCAL_STRINGS_H = ln /usr/include/string.h ./strings.h
227  GET_LOCAL_STRINGS_H = cp /usr/include/string.h ./strings.h
228*/
229#endif
230
231
232/*#############################################################################
233**#############################################################################
234** Third section:  I think no sites need to set any values.
235** BUT PLEASE LOOK, you may be able to give me some suggestions...
236**#############################################################################
237**###########################################################################**/
238
239#ifndef WcTopDir
240#define WcTopDir .
241#endif
242
243/******************************************************************************
244** Backward compatibility: X11R4 uses HasSunOSSharedLibraries, X11R5 uses
245** HasSharedLibraries instead.
246*/
247#if XRelease < 50
248#ifndef HasSharedLibraries
249#ifdef HasSunOSSharedLibraries
250#define HasSharedLibraries HasSunOSSharedLibraries
251#else
252#define HasSharedLibraries NO
253#endif
254#endif
255#endif
256
257/******************************************************************************
258** I do not want to figure out SGI shared libraries, as they are soon going
259** to SVR4 which is alot better anyway.  If someone wants to donate the
260** library specification files, I will incorporate them
261*/
262#ifdef SGIArchitecture
263#if OSMajorVersion < 4
264#ifdef HasSharedLibraries
265#undef HasSharedLibraries
266#endif
267#define HasSharedLibraries NO
268#endif
269#if OSMajorVersion == 4 && OSMinorVersion == 0
270#ifdef HasSharedLibraries
271#undef HasSharedLibraries
272#endif
273#define HasSharedLibraries NO
274#endif
275#endif /*SGIArchitecture*/
276
277/******************************************************************************
278** gcc shared libraries do NOT seem to work.
279*/
280#if HasGcc
281#undef HasSharedLibraries
282#define HasSharedLibraries NO
283#undef Has_dlopen_And_dlsym
284#define Has_dlopen_And_dlsym NO
285#endif
286
287/******************************************************************************
288** This is used to build the Test clients.
289*/
290DEBUG_CLIENT_OPTIONS = DebugClientOptions
291
292/******************************************************************************
293** Extra capability is provided if your system supports dlopen() and dlsym().
294** Also, another library is required by Wcl (-ldl) and a test library is
295** built in the Stuff sub directory.
296*/
297#if Has_dlopen_And_dlsym
298DYN_LINK_FLAGS = -DWC_HAS_dlopen_AND_dlsym
299#ifdef OSF1
300        DYNLIB =
301#else
302        DYNLIB = -ldl
303#endif
304       WcSTUFF = Stuff
305#endif
306
307      WCTOPDIR = WcTopDir
308EXTRA_INCLUDES = -I$(WCTOPDIR)
309         WCLIB = -lWc $(DYNLIB)
310      WCLDFLAG = -L$(WCTOPDIR)/Wc
311         XPLIB = -lXp
312      XPLDFLAG = -L$(WCTOPDIR)/Xp
313        XMPLIB = -lXmp
314     XMPLDFLAG = -L$(WCTOPDIR)/Xmp
315        XOPLIB = -lXop
316     XOPLDFLAG = -L$(WCTOPDIR)/Xop
317    APPDEF_DEF =
318
319#define NormalLibWc  ForceNormalLibs
320#define NormalLibXp  ForceNormalLibs
321#define NormalLibXmp ForceNormalLibs
322#define NormalLibXop ForceNormalLibs
323
324#define DebugLibWc  MakeDebugLibs
325#define DebugLibXp  MakeDebugLibs
326#define DebugLibXmp MakeDebugLibs
327#define DebugLibXop MakeDebugLibs
328
329#if MakeDebugLibs
330    DEBUGWCLIB = -lWc$(DLX) $(DYNLIB)
331    DEBUGXPLIB = -lXp$(DLX)
332   DEBUGXMPLIB = -lXmp$(DLX)
333   DEBUGXOPLIB = -lXop$(DLX)
334#else
335    DEBUGWCLIB = $(WCLIB)
336    DEBUGXPLIB = $(XPLIB)
337   DEBUGXMPLIB = $(XMPLIB)
338   DEBUGXOPLIB = $(XOPLIB)
339#endif
340
341#define ProfileLibWc  MakeProfileLibs
342#define ProfileLibXp  MakeProfileLibs
343#define ProfileLibXmp MakeProfileLibs
344#define ProfileLibXop MakeProfileLibs
345
346       SOWCREV = 2.7
347
348#define SharedLibWc  HasSharedLibraries
349#define SharedLibXp  HasSharedLibraries
350#define SharedLibXmp HasSharedLibraries
351#define SharedLibXop HasSharedLibraries
352
353#if XRelease < 50
354/******************************************************************************
355** Fix broken include path specification from old releases of Imake.
356** This forces local Wcl include files to be searched before system
357** include files.  This helps alot when a system already has installed
358** a previous version of Wcl. 
359******************************************************************************
360** This must use any variables used by your Imake.tmpl file, simply re-ordered!
361******************************************************************************
362*/
363  ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) $(VENDOR_INCLUDES)
364   ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
365       CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
366    LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
367#endif
368
Note: See TracBrowser for help on using the repository browser.