source: trunk/third/wcl/WcLib.tmpl @ 8837

Revision 8837, 4.5 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8836, which included commits to RCS files with non-trunk default branches.
Line 
1XCOMM ##########################################################################
2XCOMM # SCCS_data: @(#) WcLib.tmpl      1.5 92/06/10 06:09:55
3XCOMM #
4
5/*
6 * Wcl Library Template
7 * Uses: LibraryName, and if defined, LibraryOptions and UseTableFromXp
8 * USRLIBDIR, INCDIR, SOWCREV, HEADERS, SRCS, OBJS
9 */
10
11   LIBRARY_NAME = LibraryName
12   INSTALLFLAGS = $(INSTINCFLAGS)
13       LINTLIBS = $(LINTXLIB)
14
15#if XRelease >= 50
16XCOMM # Wcl Library Template for X11R5
17XCOMM #
18
19      LIBRARY_g = $(LIBRARY_NAME)$(DLX)
20      LIBRARY_p = $(LIBRARY_NAME)_p
21
22/* LibraryObjectRule which accepts cc options
23*/
24#define CustomLibraryObjectRule(options)                                @@\
25all::                                                                   @@\
26        _DebuggedLibMkdir()                                             @@\
27        _ProfiledLibMkdir()                                             @@\
28        _SharedLibMkdir()                                               @@\
29                                                                        @@\
30.c.o:                                                                   @@\
31        _DebuggedObjCompile(options)                                    @@\
32        _ProfiledObjCompile(options)                                    @@\
33        _SharedObjCompile(options)                                      @@\
34        _NormalObjCompile(options)                                      @@\
35                                                                        @@\
36clean::                                                                 @@\
37        _DebuggedCleanDir()                                             @@\
38        _ProfiledCleanDir()                                             @@\
39        _SharedCleanDir()                                               @@\
40
41
42#ifdef LibraryOptions
43DEPENDFLAGS = LibraryOptions
44CustomLibraryObjectRule($(DEPENDFLAGS))
45#else
46LibraryObjectRule()
47#endif
48
49#if DoSharedLib
50#if DoNormalLib
51SharedLibraryTarget($(LIBRARY_NAME),$(SOWCREV),$(OBJS),shared,..)
52#else
53SharedLibraryTarget($(LIBRARY_NAME),$(SOWCREV),$(OBJS),.,.)
54#endif
55InstallSharedLibrary($(LIBRARY_NAME),$(SOWCREV),$(USRLIBDIR))
56#endif
57#if DoNormalLib
58NormalLibraryTarget($(LIBRARY_NAME),$(OBJS))
59InstallLibrary($(LIBRARY_NAME),$(USRLIBDIR))
60#endif
61#if DoProfileLib
62ProfiledLibraryTarget($(LIBRARY_NAME),$(OBJS))
63InstallLibrary($(LIBRARY_p),$(USRLIBDIR))
64#endif
65#if DoDebugLib
66DebuggedLibraryTarget($(LIBRARY_NAME),$(OBJS))
67InstallLibrary($(LIBRARY_g),$(USRLIBDIR))
68#endif
69
70LintLibraryTarget($(LIBRARY_NAME),$(SRCS))
71InstallLintLibrary($(LIBRARY_NAME),$(LINTLIBDIR))
72
73BuildIncludes($(HEADERS),$(LIBRARY_NAME),..)
74InstallMultiple($(HEADERS),$(INCDIR)/$(LIBRARY_NAME))
75
76DependTarget()
77
78NormalLintTarget($(SRCS))
79
80XCOMM # End of Wcl Library Template for X11R5
81#else
82XCOMM # Wcl Library Template for Pre-X11R5
83XCOMM #
84
85/* This really does not work properly, but if your Imake configuration
86 * really cannot support the widget sets you have,
87 *
88 *              FIX YOUR IMAKE CONFIGURATION!
89 *
90 * I cannot do everything...  (hey, its been a long day)
91 */
92#ifdef LibraryOptions
93     CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) LibraryOptions
94DEPENDFLAGS = LibraryOptions
95#endif
96
97      LIBRARY_g = $(LIBRARY_NAME)$(DLX)
98      LIBRARY_p = $(LIBRARY_NAME)_p
99
100all::
101#if DoSharedLib
102# if DoDebugLib
103SharedAndDebuggedLibraryObjectRule()
104#define MySpecialRule(a,b,c) SpecialSharedAndDebuggedObjectRule(a,b,c)
105# else
106SharedLibraryObjectRule()
107#define MySpecialRule(a,b,c) SpecialSharedObjectRule(a,b,c)
108# endif
109#else
110# if DoDebugLib && DoProfileLib
111DebuggedAndProfiledLibraryObjectRule()
112#define MySpecialRule(a,b,c) SpecialDebuggedAndProfiledObjectRule(a,b,c)
113# else
114#  if DoDebugLib
115DebuggedLibraryObjectRule()
116#define MySpecialRule(a,b,c) SpecialDebuggedObjectRule(a,b,c)
117#  else
118#   if DoProfileLib
119ProfiledLibraryObjectRule()
120#define MySpecialRule(a,b,c) SpecialProfiledObjectRule(a,b,c)
121#   else
122NormalLibraryObjectRule()
123#define MySpecialRule(a,b,c) SpecialObjectRule(a,b,c)
124#   endif
125#  endif
126# endif
127#endif
128
129#ifndef SpecialLibObjectRule
130#define SpecialLibObjectRule(objs,deps,options) MySpecialRule(objs,deps,options)
131#endif
132
133#if HasSharedLibraries && DoSharedLib
134NormalSharedLibraryTarget($(LIBRARY_NAME),$(SOWCREV),$(OBJS))
135InstallSharedLibrary($(LIBRARY_NAME),$(SOWCREV),$(USRLIBDIR))
136#endif
137
138#if DoNormalLib
139NormalLibraryTarget($(LIBRARY_NAME),$(OBJS))
140InstallLibrary($(LIBRARY_NAME),$(USRLIBDIR))
141#endif
142
143LintLibraryTarget($(LIBRARY_NAME),$(SRCS))
144InstallLintLibrary($(LIBRARY_NAME),$(LINTLIBDIR))
145
146#if DoProfileLib
147ProfiledLibraryTarget($(LIBRARY_NAME),$(OBJS))
148InstallLibrary($(LIBRARY_p),$(USRLIBDIR))
149#endif
150
151#if DoDebugLib
152DebuggedLibraryTarget($(LIBRARY_NAME),$(OBJS))
153InstallLibrary($(LIBRARY_g),$(USRLIBDIR))
154#endif
155
156MakeDirectories(install,$(INCDIR)/$(LIBRARY_NAME))
157InstallMultiple($(HEADERS),$(INCDIR)/$(LIBRARY_NAME))
158BuildIncludes($(HEADERS),$(LIBRARY_NAME),..)
159
160DependTarget()
161
162NormalLintTarget($(SRCS))
163
164XCOMM # End of Wcl Library Template for Pre-X11R5
165#endif
166
167#ifdef UseTableFromXp
168/* Get Table sources before depending in "make World"
169*/
170includes:: Table.c TableLoc.c TableVec.c
171
172Table.c: ../Xp/Table.c
173        rm -f Table.c ; $(LN) ../Xp/Table.c .
174
175TableLoc.c: ../Xp/TableLoc.c
176        rm -f TableLoc.c ; $(LN) ../Xp/TableLoc.c .
177
178TableVec.c: ../Xp/TableVec.c
179        rm -f TableVec.c ; $(LN) ../Xp/TableVec.c .
180#endif
Note: See TracBrowser for help on using the repository browser.