c7b70f9917360dc6d906a11532b26135328874e7
[oweals/cde.git] / cde / programs / dtappbuilder / src / ab / Imakefile
1 XCOMM $TOG: Imakefile /main/19 1999/03/29 09:33:27 mgreess $
2 XCOMM
3 XCOMM   RESTRICTED CONFIDENTIAL INFORMATION:
4 XCOMM   
5 XCOMM   The information in this document is subject to special
6 XCOMM   restrictions in a confidential disclosure agreement between
7 XCOMM   HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
8 XCOMM   document outside HP, IBM, Sun, USL, SCO, or Univel without
9 XCOMM   Sun's specific written approval.  This document and all copies
10 XCOMM   and derivative works thereof must be returned or destroyed at
11 XCOMM   Sun's request.
12 XCOMM
13 XCOMM (c) Copyright 1996 Digital Equipment Corporation.
14 XCOMM (c) Copyright 1996 Hewlett-Packard Company.
15 XCOMM (c) Copyright 1996 International Business Machines Corp.
16 XCOMM (c) Copyright 1993,1996 Sun Microsystems, Inc.
17 XCOMM (c) Copyright 1996 Novell, Inc. 
18 XCOMM (c) Copyright 1996 FUJITSU LIMITED.
19 XCOMM (c) Copyright 1996 Hitachi.
20
21 /*
22  * Since dtcodegen depends on libXm, libDtWidget, and other libs, 
23  * it will not be built properly during make includes.
24  * So, when 'all' is made in this directory, redo make includes/depend.
25  * An imake hack no doubt, but it is necessary for now.
26  */
27 all:: generated_includes abdepend
28
29 #include "../ab.tmpl"
30 #include "../ab.rules"
31
32     INCLUDES = -I. -I$(ABINCLUDES)
33      DEFINES = -DPIXMAP_WORKAROUND
34
35 #ifndef GeneratedUISource
36 #define GeneratedUISource(macro, suffix)        @@\
37 macro = \                               @@\
38 Concat(dtb_utils,suffix) \              @@\
39 Concat(appfw_ui,suffix) \               @@\
40 Concat(brws_ui,suffix) \                @@\
41 Concat(color_chooser_ui,suffix) \       @@\
42 Concat(conn_ui,suffix) \                @@\
43 Concat(dnd_ed_ui,suffix) \              @@\
44 Concat(help_ed_ui,suffix) \             @@\
45 Concat(attch_ed_ui,suffix) \            @@\
46 Concat(proj_ui,suffix) \                @@\
47 Concat(revolv_ui,suffix) \              @@\
48 Concat(button_ui,suffix) \              @@\
49 Concat(choice_ui,suffix) \              @@\
50 Concat(combobox_ui,suffix) \            @@\
51 Concat(cpanel_ui,suffix) \              @@\
52 Concat(custdlg_ui,suffix) \             @@\
53 Concat(drawp_ui,suffix) \               @@\
54 Concat(group_ui,suffix) \               @@\
55 Concat(label_ui,suffix) \               @@\
56 Concat(list_ui,suffix) \                @@\
57 Concat(mainwin_ui,suffix) \             @@\
58 Concat(menu_ui,suffix) \                @@\
59 Concat(menubar_ui,suffix) \             @@\
60 Concat(scale_ui,suffix) \               @@\
61 Concat(sep_ui,suffix) \                 @@\
62 Concat(spinbox_ui,suffix) \             @@\
63 Concat(termp_ui,suffix) \               @@\
64 Concat(textf_ui,suffix) \               @@\
65 Concat(textp_ui,suffix) \               @@\
66 Concat(cgen_win_ui,suffix) \            @@\
67 Concat(cgen_props_ui,suffix) \          @@\
68 Concat(cgen_env_ui,suffix) \            @@\
69 Concat(fchooser_ui,suffix) \            @@\
70 Concat(message_ed_ui,suffix) \          @@\
71 Concat(panedwin_ed_ui,suffix) \         @@\
72 Concat(palette_ui,suffix) \             @@\
73 Concat(about_box_ui,suffix)
74 #endif
75 GeneratedUISource(TARGETS.h,.h)
76 GeneratedUISource(TARGETS.c,.c)
77 GeneratedUISource(TARGETS.o,.o)
78
79 TARGETS.h.merged = \
80         dtbuilder.h
81
82 #ifndef GeneratedStubsSource
83 #define GeneratedStubsSource(macro, suffix)     @@\
84 macro = \                                       @@\
85 Concat(appfw_stubs,suffix) \                    @@\
86 Concat(brws_stubs,suffix) \                     @@\
87 Concat(color_chooser_stubs,suffix) \            @@\
88 Concat(conn_stubs,suffix) \                     @@\
89 Concat(dnd_ed_stubs,suffix) \                   @@\
90 Concat(help_ed_stubs,suffix) \                  @@\
91 Concat(attch_ed_stubs,suffix) \                 @@\
92 Concat(proj_stubs,suffix) \                     @@\
93 Concat(revolv_stubs,suffix) \                   @@\
94 Concat(button_stubs,suffix) \                   @@\
95 Concat(choice_stubs,suffix) \                   @@\
96 Concat(combobox_stubs,suffix) \                 @@\
97 Concat(cpanel_stubs,suffix) \                   @@\
98 Concat(custdlg_stubs,suffix) \                  @@\
99 Concat(drawp_stubs,suffix) \                    @@\
100 Concat(group_stubs,suffix) \                    @@\
101 Concat(label_stubs,suffix) \                    @@\
102 Concat(list_stubs,suffix) \                     @@\
103 Concat(mainwin_stubs,suffix) \                  @@\
104 Concat(menu_stubs,suffix) \                     @@\
105 Concat(menubar_stubs,suffix) \                  @@\
106 Concat(scale_stubs,suffix) \                    @@\
107 Concat(sep_stubs,suffix) \                      @@\
108 Concat(spinbox_stubs,suffix) \                  @@\
109 Concat(termp_stubs,suffix) \                    @@\
110 Concat(textf_stubs,suffix) \                    @@\
111 Concat(textp_stubs,suffix) \                    @@\
112 Concat(cgen_win_stubs,suffix) \                 @@\
113 Concat(cgen_props_stubs,suffix) \               @@\
114 Concat(cgen_env_stubs,suffix) \                 @@\
115 Concat(fchooser_stubs,suffix) \                 @@\
116 Concat(message_ed_stubs,suffix) \               @@\
117 Concat(palette_stubs,suffix) \                  @@\
118 Concat(about_box_stubs,suffix)
119 #endif
120 GeneratedStubsSource(TARGETS.c.stubs,.c)
121 GeneratedStubsSource(TARGETS.o.stubs,.o)
122
123 TARGETS.c.merged = \
124         dtbuilder.c \
125         $(TARGETS.c.stubs)
126
127 SOURCES.h = $(TARGETS.h.merged) $(TARGETS.h)
128
129 SOURCES.c = $(TARGETS.c.merged) $(TARGETS.c)
130
131
132 SOURCES.h.shipped =
133
134 SOURCES.h.shared = \
135                 $(TARGETS.h)    \
136                 ab.h            \
137                 ab_resources.h  \
138                 ab_utils.h      \
139                 abobj.h         \
140                 abobj_edit.h    \
141                 abobj_list.h    \
142                 abobj_set.h     \
143                 abobjP.h        \
144                 ab_bil.h        \
145                 ab_dnd.h        \
146                 appfw.h         \
147                 attch_ed.h      \
148                 brws.h          \
149                 brwsP.h         \
150                 cgen.h          \
151                 color_chooser.h \
152                 conn.h          \
153                 connP.h         \
154                 dtbuilder.h     \
155                 help.h          \
156                 message.h       \
157                 pal.h           \
158                 proj.h          \
159                 projP.h         \
160                 prop.h          \
161                 propP.h         \
162                 tmode.h         \
163                 tmodeP.h        \
164                 ui_util.h       \
165                 vwr.h           \
166                 x_util.h
167
168 SOURCES.h.unshared = \
169                 abobjP.h
170
171 SOURCES.msg = \
172                 dtbuilder.msg   \
173                 ../libAButil/libAButil.msg \
174                 ../libABobjXm/libABobjXm.msg \
175                 ../libABil/libABil.msg
176
177 AB_MAKEFILES = \
178         Makefile.aix \
179         Makefile.hpux \
180         Makefile.sunos \
181         Makefile.osf1 \
182         Makefile.uxp \
183         Makefile.unixware \
184         Makefile.linux \
185         Makefile.freebsd \
186         Makefile.netbsd \
187         Makefile.openbsd
188
189 #ifndef UngeneratedSource
190 #define UngeneratedSource(macro, suffix)        @@\
191 macro = \                                       @@\
192 Concat(ab_utils,suffix) \                       @@\
193 Concat(ab_bil,suffix) \                         @@\
194 Concat(ab_dnd,suffix) \                         @@\
195 Concat(ab_globals,suffix) \                     @@\
196 Concat(abobj_align,suffix) \                    @@\
197 Concat(abobj_edit,suffix) \                     @@\
198 Concat(abobj_list,suffix) \                     @@\
199 Concat(abobj_events,suffix) \                   @@\
200 Concat(abobj_layers,suffix) \                   @@\
201 Concat(abobj_layout,suffix) \                   @@\
202 Concat(abobj_menu,suffix) \                     @@\
203 Concat(abobj_move,suffix) \                     @@\
204 Concat(abobj_resize,suffix) \                   @@\
205 Concat(abobj_select,suffix) \                   @@\
206 Concat(abobj_set,suffix) \                      @@\
207 Concat(abobj_util,suffix) \                     @@\
208 Concat(brws,suffix) \                           @@\
209 Concat(brws_find,suffix) \                      @@\
210 Concat(brws_mthds,suffix) \                     @@\
211 Concat(brws_utils,suffix) \                     @@\
212 Concat(cgen_utils,suffix) \                     @@\
213 Concat(conn_drag,suffix) \                      @@\
214 Concat(conn_interpret,suffix) \                 @@\
215 Concat(conn_obj,suffix) \                       @@\
216 Concat(dtbuilder,suffix) \                      @@\
217 Concat(pal,suffix) \                            @@\
218 Concat(pal_create,suffix) \                     @@\
219 Concat(pal_button,suffix) \                     @@\
220 Concat(pal_choice,suffix) \                     @@\
221 Concat(pal_combobox,suffix) \                   @@\
222 Concat(pal_cpanel,suffix) \                     @@\
223 Concat(pal_custdlg,suffix) \                    @@\
224 Concat(pal_drawp,suffix) \                      @@\
225 Concat(pal_fchooser,suffix) \                   @@\
226 Concat(pal_group,suffix) \                      @@\
227 Concat(pal_label,suffix) \                      @@\
228 Concat(pal_list,suffix) \                       @@\
229 Concat(pal_mainwin,suffix) \                    @@\
230 Concat(pal_menu,suffix) \                       @@\
231 Concat(pal_menubar,suffix) \                    @@\
232 Concat(pal_panedwin,suffix) \                   @@\
233 Concat(pal_scale,suffix) \                      @@\
234 Concat(pal_sep,suffix) \                        @@\
235 Concat(pal_spinbox,suffix) \                    @@\
236 Concat(pal_termp,suffix) \                      @@\
237 Concat(pal_textf,suffix) \                      @@\
238 Concat(pal_textp,suffix) \                      @@\
239 Concat(proj,suffix) \                           @@\
240 Concat(proj_utils,suffix) \                     @@\
241 Concat(projP_utils,suffix) \                    @@\
242 Concat(prop,suffix) \                           @@\
243 Concat(prop_items,suffix) \                     @@\
244 Concat(tmode,suffix) \                          @@\
245 Concat(tmodeP,suffix) \                         @@\
246 Concat(ui_msg,suffix) \                         @@\
247 Concat(ui_list,suffix) \                        @@\
248 Concat(ui_util,suffix) \                        @@\
249 Concat(vwr,suffix) \                            @@\
250 Concat(x_util,suffix)
251 #endif
252 UngeneratedSource(NONTGTS.c,.c)
253 UngeneratedSource(NONTGTS.o,.o)
254
255 SRCS2 = $(TARGETS.c) $(TARGETS.c.stubs) $(NONTGTS.c)
256 OBJS2 = $(TARGETS.o) $(TARGETS.o.stubs) $(NONTGTS.o)
257
258 SYS_LIBRARIES = -lm $(ICONVSYSLIB) $(DYNLIBSYSLIB) $(REGEXSYSLIB)
259
260 #ifdef  SunArchitecture
261 WAITTARGET = .WAIT
262 #endif  /* SunArchitecture */
263
264 #ifdef  BSDArchitecture
265 UTILLIB = -lutil
266 #endif  /* BSDArchitecture */
267
268 PROGRAMS = dtbuilder
269 LINTLIBS = $(XINPUTLIB) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XLIB)
270
271 /* DEPLIBS contains the list of library depencies for a client.
272  * LOCAL_LIBRARIES contains the list of libraries on the link line.
273  * Generally, the dependency form of a library has DEP as a prefix.
274  * e.g. put $(XLIB) in LOCAL_LIBRARIES and $(DEPXLIB) in DEPLIBS.
275  * NOTE: if DEPLIBS is not set here, it is by default null and there
276  *       are no library dependencies for clients.
277  *       You cannot put -Llibpath into DEPLIBS. You must put actual
278  *       paths to the library.
279  */
280 DEPLIBS = ../libABil/libABil.a  ../libABobjXm/libABobjXm.a  \
281         ../libABobj/libABobj.a ../libAButil/libAButil.a $(DEPDTWIDGETLIB) \
282         $(DEPDTTERMLIB) $(DEPDTHELPLIB) $(DEPDTSVCLIB) $(DEPTTLIB) \
283         $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB) \
284         $(DEPUTILLIB)
285 LOCAL_LIBRARIES = ../libABil/libABil.a  ../libABobjXm/libABobjXm.a  \
286         ../libABobj/libABobj.a ../libAButil/libAButil.a \
287         $(DTWIDGETLIB) $(DTTERMLIB) $(DTHELPLIB) $(DTSVCLIB) \
288         $(TTLIB) $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
289         $(UTILLIB)
290
291 /* dtcodegen needs path to catalogfile */
292 DTCODEGENCAT = NLSPATH=$(CDESRC)/dtappbuilder/src/abmf/dtcodegen.cat
293
294 $(OBJS2):       $(SOURCES.h)
295
296 XCOMM dtcodegen wants to rewrite some files, so we make copies for it.
297 dtbuilder.msg: dtbuilder.msg.src
298         $(CP) $? $@ && chmod ug+w $@
299 dtbuilder.c: dtbuilder.c.src
300         $(CP) $? $@ && chmod ug+w $@
301
302 includes:: dtbuilder.msg dtbuilder.c
303
304 all:: $(PROGRAMS)
305
306 ComplexProgramTarget_2(dtbuilder,$(LOCAL_LIBRARIES),)
307
308 abdepend:: DependFileName
309
310 DependFileName::
311         -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) $(SRCS2)) > $@
312
313 clean::
314         RemoveFile(ProgramTargetName($(PROGRAMS)))
315
316 AbMessageCatalogTarget(dtbuilder)
317
318 XCOMM Try to replace the original dtbuilder.msg.src file if necessary.
319 all:: dtbuilder dtbuilder.cat
320
321 clean::
322         $(RM) $(TARGETS.h) $(TARGETS.c) $(AB_MAKEFILES) .dtcodegen.log *.delta dtbuilder.c dtbuilder.msg
323
324 CppSourceFile(Dtbuilder,Dtbuilder.src,$(LOCAL_CPP_DEFINES),)
325
326 LinkFileList(generated_includes,$(SOURCES.h.shared),../include/ab_private,../../ab)
327
328 XCOMM includes:: generated_includes
329 sdtgilcvt:
330
331 #ifdef  SunArchitecture
332 dtbuilder.h + dtb_utils.c + dtb_utils.h:: dtbuilder.bip dtbuilder.c dtbuilder.msg
333         $(DTCODEGEN) -changed -merge -p dtbuilder.bip -main
334 dtbuilder.o: dtbuilder.c dtbuilder.bip $(TARGETS.h) $(TARGETS.h.merged)
335 #else
336 dtbuilder.h dtb_utils.c dtb_utils.h:: dtbuilder.bip dtbuilder.c dtbuilder.msg
337         $(DTCODEGEN) -changed -merge -p dtbuilder.bip -main
338 dtbuilder.o: dtbuilder.c dtbuilder.bip $(TARGETS.h) $(TARGETS.h.merged)
339 #endif
340
341 PROJFILE = dtbuilder
342
343 BilTarget(about_box)
344 BilTarget(appfw)
345 BilTarget(attch_ed)
346 BilTarget(brws)
347 BilTarget(button)
348 BilTarget(cgen_env)
349 BilTarget(cgen_props)
350 BilTarget(cgen_win)
351 BilTarget(choice)
352 BilTarget(color_chooser)
353 BilTarget(combobox)
354 BilTarget(conn)
355 BilTarget(cpanel)
356 BilTarget(custdlg)
357 BilTarget(dnd_ed)
358 BilTarget(drawp)
359 BilTarget(fchooser)
360 BilTarget(group)
361 BilTarget(help_ed)
362 BilTarget(label)
363 BilTarget(list)
364 BilTarget(mainwin)
365 BilTarget(menu)
366 BilTarget(menubar)
367 BilTarget(message_ed)
368 BilTarget(palette)
369 BilTarget(panedwin_ed)
370 BilTarget(proj)
371 BilTarget(revolv)
372 BilTarget(scale)
373 BilTarget(sep)
374 BilTarget(spinbox)
375 BilTarget(termp)
376 BilTarget(textf)
377 BilTarget(textp)