Link with C++ linker
[oweals/cde.git] / cde / programs / nsgmls / Imakefile
1 XCOMM $TOG: Imakefile /main/13 1998/04/06 13:38:18 mgreess $
2
3 DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
4
5 #include <Library.tmpl>
6
7 #ifdef AlphaArchitecture
8
9 /*
10  * The OSF 3.2 compiler has a bug which prevents the use of
11  * template class destructors (see Vector.c)
12  */
13 #if OSMajorVersion < 4
14 CXX_COMPILER_BUG_OPTION = -DSP_TEMPLATE_DESTRUCTOR_COMPILER_BUG
15 #else
16 CXX_COMPILER_BUG_OPTION =
17 #endif
18
19 /*
20  * put cpp directives here rather than in CXXDEFINES because
21  * for some reason the CXXDEFINES aren't passed to the link phase
22  * but they are needed there to instantiate templates
23  */
24 CXXOPTIONS = \
25   -DSP_VOLATILE= -DSP_CONST= $(CXX_COMPILER_BUG_OPTION) \
26   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_MANUAL_INST
27
28 /*
29  * Flags passed into compile step when doing manual template instantiation.
30  */
31 CXXTEMPLATEFLAGS = -ptf
32
33 M4 = /bin/m4
34 #endif
35
36 #ifdef SCOArchitecture
37 /* put cpp directives here rather than in CXXDEFINES because
38  * for some reason the CXXDEFINES aren't passed to the link phase
39  * but they are needed there to instantiate templates
40  */
41 CXXOPTIONS = \
42   -DSP_VOLATILE= -DSP_CONST= \
43   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_MANUAL_INST
44
45 /*
46  * Flags passed into compile step when doing manual template instantiation.
47  */
48 CXXTEMPLATEFLAGS =
49
50 M4 = /bin/m4
51 #endif
52
53 #ifdef HPArchitecture
54 /*
55  * make null pointer use invalid
56  *
57  * also, put cpp directives here rather than in CXXDEFINES because
58  * for some reason the CXXDEFINES aren't passed to the link phase
59  * but they are needed there to instantiate templates
60  */
61 CXXOPTIONS = +a1 -z \
62   -DSP_VOLATILE= -DSP_CONST= \
63   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_ANSI_CLASS_INST
64 EXTRA_INCLUDES = -I/opt/CC/include/CC
65
66 /*
67  * Flags passed into compile step when doing manual template instantiation.
68  */
69 CXXTEMPLATEFLAGS =
70
71 /*
72  * using /usr/lib/libC.a on HPUX cause nsgmls to core dump.
73  * use the default.
74  */
75 STLIBCENV =
76
77 M4 = /bin/m4
78 #endif
79
80 #ifdef LinuxArchitecture
81
82 /*
83  * put cpp directives here rather than in CXXDEFINES because
84  * for some reason the CXXDEFINES aren't passed to the link phase
85  * but they are needed there to instantiate templates
86  */
87 CXXOPTIONS = \
88   -DSP_VOLATILE= -DSP_CONST= \
89   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_MANUAL_INST
90
91 /*
92  * Flags passed into compile step when doing manual template instantiation.
93  */
94 CXXTEMPLATEFLAGS = -ptf
95
96 M4 = /usr/bin/m4
97 #endif
98
99 #if defined(RsArchitecture)
100 /* put cpp directives here rather than in CXXDEFINES because
101  * for some reason the CXXDEFINES aren't passed to the link phase
102  * but they are needed there to instantiate templates
103  */
104 CXXOPTIONS = \
105   -DSP_VOLATILE=volatile -DSP_CONST=const \
106   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_MANUAL_INST
107
108 /*
109  * Flags passed into compile step when doing manual template instantiation.
110  */
111 CXXTEMPLATEFLAGS =
112
113 M4 = /bin/m4
114 #endif
115
116 #if defined(SunArchitecture)
117 /* put cpp directives here rather than in CXXDEFINES because
118  * for some reason the CXXDEFINES aren't passed to the link phase
119  * but they are needed there to instantiate templates
120  */
121 CXXOPTIONS = \
122   -DSP_VOLATILE= -DSP_CONST= \
123   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_ANSI_CLASS_INST
124 EXTRA_INCLUDES = -I/opt/SUNWspro/SC2.0.1/include/CC
125
126 /*
127  * Flags passed into compile step when doing manual template instantiation.
128  */
129 CXXTEMPLATEFLAGS =
130
131 M4 = /usr/ccs/bin/m4
132 #endif /* SunArchitecture */
133
134 #if defined(USLArchitecture)
135 /* put cpp directives here rather than in CXXDEFINES because
136  * for some reason the CXXDEFINES aren't passed to the link phase
137  * but they are needed there to instantiate templates
138  */
139 CXXOPTIONS = \
140   -DSP_VOLATILE= -DSP_CONST= \
141   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_MANUAL_INST
142
143 /*
144  * Flags passed into compile step when doing manual template instantiation.
145  */
146 CXXTEMPLATEFLAGS =
147
148 M4 = /bin/m4
149 #endif
150
151 #if defined(UXPArchitecture)
152 /* put cpp directives here rather than in CXXDEFINES because
153  * for some reason the CXXDEFINES aren't passed to the link phase
154  * but they are needed there to instantiate templates
155  */
156 CXXOPTIONS = \
157   -DSP_VOLATILE= -DSP_CONST= \
158   -DSP_HAVE_LOCALE -DSP_MULTI_BYTE -DSP_MANUAL_INST
159
160 /*
161  * Flags passed into compile step when doing manual template instantiation.
162  */
163 CXXTEMPLATEFLAGS = -pta
164
165 M4 = /usr/ccs/bin/m4
166 #endif
167
168 .SUFFIXES: .m4
169 .m4.C:
170         rm -f $@
171         $(M4) instmac.m4 $< >$@
172
173 PROGRAMS=nsgmls
174
175
176 INSTALLFLAGS = $(INSTINCFLAGS)
177
178 SRCS =                           \
179     Allocator.C                  \
180     ArcEngine.C                  \
181     Attribute.C                  \
182     CharsetDecl.C                \
183     CharsetInfo.C                \
184     CharsetRegistry.C            \
185     CmdLineApp.C                 \
186     CodingSystem.C               \
187     ConsoleOutput.C              \
188     ContentState.C               \
189     ContentToken.C               \
190     DescriptorManager.C          \
191     Dtd.C                        \
192     EUCJPCodingSystem.C          \
193     ElementType.C                \
194     Entity.C                     \
195     EntityApp.C                  \
196     EntityCatalog.C              \
197     EntityDecl.C                 \
198     EntityManager.C              \
199     ErrnoMessageArg.C            \
200     ErrorCountEventHandler.C     \
201     Event.C                      \
202     EventGenerator.C             \
203     ExtendEntityManager.C        \
204     ExternalId.C                 \
205     Fixed2CodingSystem.C         \
206     GenericEventHandler.C        \
207     Group.C                      \
208     Hash.C                       \
209     IListBase.C                  \
210     ISO8859InputCodingSystem.C   \
211     Id.C                         \
212     IdentityCodingSystem.C       \
213     InputSource.C                \
214     InternalInputSource.C        \
215     Link.C                       \
216     LinkProcess.C                \
217     LiteralStorage.C             \
218     Location.C                   \
219     Lpd.C                        \
220     Markup.C                     \
221     Message.C                    \
222     MessageArg.C                 \
223     MessageEventHandler.C        \
224     MessageReporter.C            \
225     MessageTable.C               \
226     ModeInfo.C                   \
227     Notation.C                   \
228     NumericCharRefOrigin.C       \
229     OffsetOrderedList.C          \
230     OpenElement.C                \
231     OutputCharStream.C           \
232     OutputState.C                \
233     Parser.C                     \
234     Param.C                      \
235     ParserApp.C                  \
236     ParserEventGeneratorKit.C    \
237     ParserOptions.C              \
238     ParserState.C                \
239     Partition.C                  \
240     PosixStorage.C               \
241     RastEventHandler.C           \
242     Recognizer.C                 \
243     RewindStorageObject.C        \
244     SGMLApplication.C            \
245     SJISCodingSystem.C           \
246     SOEntityCatalog.C            \
247     Sd.C                         \
248     SdText.C                     \
249     SearchResultMessageArg.C     \
250     SgmlParser.C                 \
251     SgmlsEventHandler.C          \
252     ShortReferenceMap.C          \
253     StdioStorage.C               \
254     StorageManager.C             \
255     StringSet.C                  \
256     StringVectorMessageArg.C     \
257     Syntax.C                     \
258     Text.C                       \
259     TokenMessageArg.C            \
260     TranslateInputCodingSystem.C \
261     TrieBuilder.C                \
262     TypeId.C                     \
263     URLStorage.C                 \
264     UTF8CodingSystem.C           \
265     Undo.C                       \
266     UnicodeCodingSystem.C        \
267     UnivCharsetDesc.C            \
268     assert.C                     \
269     nsgmls.C                     \
270     parseAttribute.C             \
271     parseCommon.C                \
272     parseDecl.C                  \
273     parseInstance.C              \
274     parseMode.C                  \
275     parseParam.C                 \
276     parseSd.C                    \
277     splib.C                      \
278     $(GENERATED_SRCS)
279
280 GENERATED_SRCS =                 \
281     app_inst.C                   \
282     arc_inst.C                   \
283     entmgr_inst.C                \
284     nsgmls_inst.C                \
285     parser_inst.C                \
286     xentmgr_inst.C
287
288 EXTRA_SRCS = \
289     CopyOwner.C                  \
290     HashTable.C                  \
291     HashTableItemBase.C          \
292     IQueue.C                     \
293     ISet.C                       \
294     List.C                       \
295     NCVector.C                   \
296     Options.C                    \
297     Owner.C                      \
298     OwnerTable.C                 \
299     ParserMessages.C             \
300     PointerTable.C               \
301     Ptr.C                        \
302     RangeMap.C                   \
303     StringOf.C                   \
304     SubstTable.C                 \
305     Vector.C                     \
306     XcharMap.C
307
308 OBJS =                           \
309     Allocator.o                  \
310     ArcEngine.o                  \
311     Attribute.o                  \
312     CharsetDecl.o                \
313     CharsetInfo.o                \
314     CharsetRegistry.o            \
315     CmdLineApp.o                 \
316     CodingSystem.o               \
317     ConsoleOutput.o              \
318     ContentState.o               \
319     ContentToken.o               \
320     DescriptorManager.o          \
321     Dtd.o                        \
322     EUCJPCodingSystem.o          \
323     ElementType.o                \
324     Entity.o                     \
325     EntityApp.o                  \
326     EntityCatalog.o              \
327     EntityDecl.o                 \
328     EntityManager.o              \
329     ErrnoMessageArg.o            \
330     ErrorCountEventHandler.o     \
331     Event.o                      \
332     EventGenerator.o             \
333     ExtendEntityManager.o        \
334     ExternalId.o                 \
335     Fixed2CodingSystem.o         \
336     GenericEventHandler.o        \
337     Group.o                      \
338     Hash.o                       \
339     IListBase.o                  \
340     ISO8859InputCodingSystem.o   \
341     Id.o                         \
342     IdentityCodingSystem.o       \
343     InputSource.o                \
344     InternalInputSource.o        \
345     Link.o                       \
346     LinkProcess.o                \
347     LiteralStorage.o             \
348     Location.o                   \
349     Lpd.o                        \
350     Markup.o                     \
351     Message.o                    \
352     MessageArg.o                 \
353     MessageEventHandler.o        \
354     MessageReporter.o            \
355     MessageTable.o               \
356     ModeInfo.o                   \
357     Notation.o                   \
358     NumericCharRefOrigin.o       \
359     OffsetOrderedList.o          \
360     OpenElement.o                \
361     OutputCharStream.o           \
362     OutputState.o                \
363     Param.o                      \
364     Parser.o                     \
365     ParserApp.o                  \
366     ParserEventGeneratorKit.o    \
367     ParserOptions.o              \
368     ParserState.o                \
369     Partition.o                  \
370     PosixStorage.o               \
371     RastEventHandler.o           \
372     Recognizer.o                 \
373     RewindStorageObject.o        \
374     SGMLApplication.o            \
375     SJISCodingSystem.o           \
376     SOEntityCatalog.o            \
377     Sd.o                         \
378     SdText.o                     \
379     SearchResultMessageArg.o     \
380     SgmlParser.o                 \
381     SgmlsEventHandler.o          \
382     ShortReferenceMap.o          \
383     StdioStorage.o               \
384     StorageManager.o             \
385     StringSet.o                  \
386     StringVectorMessageArg.o     \
387     Syntax.o                     \
388     Text.o                       \
389     TokenMessageArg.o            \
390     TranslateInputCodingSystem.o \
391     TrieBuilder.o                \
392     TypeId.o                     \
393     URLStorage.o                 \
394     UTF8CodingSystem.o           \
395     Undo.o                       \
396     UnicodeCodingSystem.o        \
397     UnivCharsetDesc.o            \
398     assert.o                     \
399     nsgmls.o                     \
400     parseAttribute.o             \
401     parseCommon.o                \
402     parseDecl.o                  \
403     parseInstance.o              \
404     parseMode.o                  \
405     parseParam.o                 \
406     parseSd.o                    \
407     splib.o                      \
408     $(GENERATED_OBJS)
409
410 GENERATED_OBJS =                 \
411     app_inst.o                   \
412     arc_inst.o                   \
413     entmgr_inst.o                \
414     nsgmls_inst.o                \
415     parser_inst.o                \
416     xentmgr_inst.o
417
418 EXTRA_OBJS = \
419     CopyOwner.o                  \
420     HashTable.o                  \
421     HashTableItemBase.o          \
422     IQueue.o                     \
423     ISet.o                       \
424     List.o                       \
425     NCVector.o                   \
426     Options.o                    \
427     Owner.o                      \
428     OwnerTable.o                 \
429     ParserMessages.o             \
430     PointerTable.o               \
431     Ptr.o                        \
432     RangeMap.o                   \
433     StringOf.o                   \
434     SubstTable.o                 \
435     Vector.o                     \
436     XcharMap.o
437
438 #ifdef HPArchitecture
439 SpecialCplusplusObjectRule(Parser,Parser,+T)
440 #endif
441
442 SpecialCplusplusObjectRule(app_inst,app_inst,$(CXXTEMPLATEFLAGS))
443 SpecialCplusplusObjectRule(arc_inst,arc_inst,$(CXXTEMPLATEFLAGS))
444 SpecialCplusplusObjectRule(entmgr_inst,entmgr_inst,$(CXXTEMPLATEFLAGS))
445 SpecialCplusplusObjectRule(nsgmls_inst,nsgmls_inst,$(CXXTEMPLATEFLAGS))
446 SpecialCplusplusObjectRule(parser_inst,parser_inst,$(CXXTEMPLATEFLAGS))
447 SpecialCplusplusObjectRule(xentmgr_inst,xentmgr_inst,$(CXXTEMPLATEFLAGS))
448
449 NormalCplusplusObjectRule()
450 ComplexCplusplusProgramTarget($(PROGRAMS))
451
452 /* make sure the template repository is cleaned */
453 clean::
454         rm -rf ptrepository
455         rm -f $(GENERATED_SRCS)
456
457 /*
458  * Required to build .o files from .m4 files on Alpha
459  */
460 app_inst.C:     app_inst.m4
461 arc_inst.C:     arc_inst.m4
462 entmgr_inst.C:  entmgr_inst.m4
463 nsgmls_inst.C:  nsgmls_inst.m4
464 parser_inst.C:  parser_inst.m4
465 xentmgr_inst.C: xentmgr_inst.m4