ncurses 5.0
[ncurses.git] / Ada95 / gen / Makefile.in
1 ##############################################################################
2 # Copyright (c) 1998 Free Software Foundation, Inc.                          #
3 #                                                                            #
4 # Permission is hereby granted, free of charge, to any person obtaining a    #
5 # copy of this software and associated documentation files (the "Software"), #
6 # to deal in the Software without restriction, including without limitation  #
7 # the rights to use, copy, modify, merge, publish, distribute, distribute    #
8 # with modifications, sublicense, and/or sell copies of the Software, and to #
9 # permit persons to whom the Software is furnished to do so, subject to the  #
10 # following conditions:                                                      #
11 #                                                                            #
12 # The above copyright notice and this permission notice shall be included in #
13 # all copies or substantial portions of the Software.                        #
14 #                                                                            #
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
18 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
20 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
21 # DEALINGS IN THE SOFTWARE.                                                  #
22 #                                                                            #
23 # Except as contained in this notice, the name(s) of the above copyright     #
24 # holders shall not be used in advertising or otherwise to promote the sale, #
25 # use or other dealings in this Software without prior written               #
26 # authorization.                                                             #
27 ##############################################################################
28 #
29 #  Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1996
30 #
31 #  Version Control
32 #  $Revision: 1.27 $
33 #
34 .SUFFIXES:
35
36 SHELL           = /bin/sh
37 THIS            = Makefile
38
39 top_srcdir      = @top_srcdir@
40 srcdir          = @srcdir@
41 prefix          = @prefix@
42 exec_prefix     = @exec_prefix@
43 libdir          = @libdir@
44 includedir      = @includedir@
45 datadir         = @datadir@
46 ticdir          = $(datadir)/terminfo
47 ADA_INCLUDE     = @ADA_INCLUDE@
48 ADA_OBJECTS     = @ADA_OBJECTS@
49
50 INSTALL         = @INSTALL@
51 INSTALL_DATA    = @INSTALL_DATA@
52
53 AWK             = @AWK@
54 LN_S            = @LN_S@
55
56 CC              = @CC@
57 CFLAGS          = @CFLAGS@
58
59 CPPFLAGS        = @ACPPFLAGS@ \
60                   -DHAVE_CONFIG_H -I$(srcdir)
61
62 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
63 CFLAGS_NORMAL   = $(CCFLAGS)
64 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
65 CFLAGS_PROFILE  = $(CCFLAGS) -pg
66 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
67
68 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
69
70 LINK            = $(CC)
71 LD_FLAGS        = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
72
73 RANLIB          = @RANLIB@
74
75 LIB_CURSES      = -L../../lib -lncurses
76
77 M4              = m4
78 M4FLAGS         =
79
80 GENERATE        = ./gen '@DFT_ARG_SUFFIX@'
81 DEL_ADAMODE     = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
82
83 ################################################################################
84 ALIB            = @cf_ada_package@
85 ABASE           = $(ALIB)-curses
86
87 ADA_SRCDIR      = ../src
88
89 GEN_FILES0      = Base_Defs
90
91 GEN_FILES1      = Key_Definitions                       \
92                   Old_Keys                              \
93                   Character_Attribute_Set_Rep           \
94                   AC_Rep                                \
95                   Color_Defs                            \
96                   ACS_Map                               \
97                   Linker_Options                        \
98                   Base_Defs                             \
99                   Window_Offsets                        \
100                   Version_Info
101
102 GEN_FILES2      = Menu_Opt_Rep                          \
103                   Menu_Base_Defs                        \
104                   Menu_Linker_Options                   \
105                   Item_Rep
106
107 GEN_FILES3      = Form_Opt_Rep                          \
108                   Form_Base_Defs                        \
109                   Form_Linker_Options                   \
110                   Field_Rep
111
112 GEN_FILES4      = Mouse_Base_Defs                       \
113                   Mouse_Event_Rep                       \
114                   Mouse_Events                          \
115                   Panel_Linker_Options
116
117 GEN_FILES5      = Chtype_Def                            \
118                   Eti_Defs
119
120 GEN_TARGETS     = $(ADA_SRCDIR)/$(ABASE).ads                            \
121                   $(ADA_SRCDIR)/$(ABASE)-aux.ads                        \
122                   $(ADA_SRCDIR)/$(ABASE)-menus.ads                      \
123                   $(ADA_SRCDIR)/$(ABASE)-forms.ads                      \
124                   $(ADA_SRCDIR)/$(ABASE)-mouse.ads                      \
125                   $(ADA_SRCDIR)/$(ABASE)-panels.ads                     \
126                   $(ADA_SRCDIR)/$(ABASE)-menus-menu_user_data.ads       \
127                   $(ADA_SRCDIR)/$(ABASE)-menus-item_user_data.ads       \
128                   $(ADA_SRCDIR)/$(ABASE)-forms-form_user_data.ads       \
129                   $(ADA_SRCDIR)/$(ABASE)-forms-field_types.ads          \
130                   $(ADA_SRCDIR)/$(ABASE)-forms-field_user_data.ads      \
131                   $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads
132
133 GEN_SRC         = $(srcdir)/$(ABASE).ads.m4                             \
134                   $(srcdir)/$(ABASE)-aux.ads.m4                         \
135                   $(srcdir)/$(ABASE)-menus.ads.m4                       \
136                   $(srcdir)/$(ABASE)-forms.ads.m4                       \
137                   $(srcdir)/$(ABASE)-mouse.ads.m4                       \
138                   $(srcdir)/$(ABASE)-panels.ads.m4                      \
139                   $(srcdir)/$(ABASE)-menus-menu_user_data.ads.m4        \
140                   $(srcdir)/$(ABASE)-menus-item_user_data.ads.m4        \
141                   $(srcdir)/$(ABASE)-forms-form_user_data.ads.m4        \
142                   $(srcdir)/$(ABASE)-forms-field_types.ads.m4           \
143                   $(srcdir)/$(ABASE)-forms-field_user_data.ads.m4       \
144                   $(srcdir)/$(ABASE)-panels-user_data.ads.m4
145
146
147 all:    $(GEN_TARGETS)
148         @
149
150 sources:
151
152 $(ADA_INCLUDE) \
153 $(ADA_OBJECTS) :
154         $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$@
155
156 install \
157 install.libs :: $(ADA_INCLUDE)
158         @echo installing package $(ALIB) in $(INSTALL_PREFIX)$(ADA_INCLUDE)
159         @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(ADA_SRCDIR) $(INSTALL_PREFIX)$(ADA_INCLUDE)
160         @test $(srcdir) != ./ && $(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(srcdir)/../src $(INSTALL_PREFIX)$(ADA_INCLUDE)
161
162 install \
163 install.libs :: $(ADA_OBJECTS)
164         @echo installing package $(ALIB) in $(INSTALL_PREFIX)$(ADA_OBJECTS)
165         @chmod a-wx $(ADA_SRCDIR)/*.ali
166         @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(INSTALL_PREFIX)$(ADA_OBJECTS)
167         @chmod u+x $(ADA_SRCDIR)/*.ali
168
169 uninstall \
170 uninstall.libs ::
171         @echo removing package $(ALIB) from $(INSTALL_PREFIX)$(ADA_INCLUDE)
172         -@cd $(INSTALL_PREFIX)$(ADA_INCLUDE) && rm -f $(ALIB)[-.]*
173
174 uninstall \
175 uninstall.libs ::
176         @echo removing package $(ALIB) from $(INSTALL_PREFIX)$(ADA_OBJECTS)
177         -@cd $(INSTALL_PREFIX)$(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
178
179 gen:    gen.o
180         @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@ $(LIB_CURSES)
181
182 gen.o:  $(srcdir)/gen.c
183         $(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
184
185 Character_Attribute_Set_Rep: gen
186         $(GENERATE) B A >$@
187
188 Base_Defs: gen
189         $(GENERATE) B B >$@
190
191 Color_Defs: gen
192         $(GENERATE) B C >$@
193
194 Key_Definitions: gen
195         $(GENERATE) B K >$@
196
197 Old_Keys: gen
198         $(GENERATE) B O >$@
199
200 ACS_Map: gen
201         $(GENERATE) B M >$@
202
203 AC_Rep: gen
204         $(GENERATE) B R >$@
205
206 Linker_Options: gen
207         $(GENERATE) B L >$@
208
209 Version_Info: gen
210         $(GENERATE) B V >$@
211
212 Window_Offsets: gen
213         $(GENERATE) B D >$@
214
215 Menu_Opt_Rep: gen
216         $(GENERATE) M R >$@
217
218 Menu_Base_Defs: gen
219         $(GENERATE) M B >$@
220
221 Menu_Linker_Options: gen
222         $(GENERATE) M L >$@
223
224 Item_Rep: gen
225         $(GENERATE) M I >$@
226
227 Form_Opt_Rep: gen
228         $(GENERATE) F R >$@
229
230 Form_Base_Defs: gen
231         $(GENERATE) F B >$@
232
233 Form_Linker_Options: gen
234         $(GENERATE) F L >$@
235
236 Field_Rep: gen
237         $(GENERATE) F I >$@
238
239 Mouse_Base_Defs: gen
240         $(GENERATE) P B >$@
241
242 Mouse_Event_Rep: gen
243         $(GENERATE) P M >$@
244
245 Mouse_Events: gen
246         $(GENERATE) B E >$@
247
248 Panel_Linker_Options: gen
249         $(GENERATE) P L >$@
250
251 Chtype_Def: gen
252         $(GENERATE) E C >$@
253
254 Eti_Defs: gen
255         $(GENERATE) E E >$@
256
257 $(ADA_SRCDIR)/$(ABASE).ads:     $(srcdir)/$(ABASE).ads.m4 \
258                                 $(GEN_FILES1) $(srcdir)/normal.m4
259         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
260         $(srcdir)/$(ABASE).ads.m4 |\
261         $(DEL_ADAMODE) >$@
262
263 $(ADA_SRCDIR)/$(ABASE)-aux.ads: $(srcdir)/$(ABASE)-aux.ads.m4 \
264                                 $(GEN_FILES5) $(srcdir)/normal.m4
265         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
266         $(srcdir)/$(ABASE)-aux.ads.m4 |\
267         $(DEL_ADAMODE) >$@
268
269 $(ADA_SRCDIR)/$(ABASE)-menus.ads: $(srcdir)/$(ABASE)-menus.ads.m4 \
270                                   $(GEN_FILES2) $(srcdir)/normal.m4
271         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
272         $(srcdir)/$(ABASE)-menus.ads.m4 |\
273         $(DEL_ADAMODE) >$@
274
275 $(ADA_SRCDIR)/$(ABASE)-forms.ads: $(srcdir)/$(ABASE)-forms.ads.m4 \
276                                   $(GEN_FILES3) $(srcdir)/normal.m4
277         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
278         $(srcdir)/$(ABASE)-forms.ads.m4 |\
279         $(DEL_ADAMODE) >$@
280
281 $(ADA_SRCDIR)/$(ABASE)-mouse.ads: $(srcdir)/$(ABASE)-mouse.ads.m4 \
282                                   $(GEN_FILES4) $(srcdir)/normal.m4
283         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
284         $(srcdir)/$(ABASE)-mouse.ads.m4 |\
285         $(DEL_ADAMODE) >$@
286
287 $(ADA_SRCDIR)/$(ABASE)-panels.ads: $(srcdir)/$(ABASE)-panels.ads.m4 \
288                                    $(srcdir)/normal.m4
289         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
290         $(srcdir)/$(ABASE)-panels.ads.m4 |\
291         $(DEL_ADAMODE) >$@
292
293 $(ADA_SRCDIR)/$(ABASE)-menus-menu_user_data.ads: \
294                 $(srcdir)/$(ABASE)-menus-menu_user_data.ads.m4 \
295                 $(srcdir)/normal.m4
296         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
297         $(srcdir)/$(ABASE)-menus-menu_user_data.ads.m4 |\
298         $(DEL_ADAMODE) >$@
299
300 $(ADA_SRCDIR)/$(ABASE)-menus-item_user_data.ads: \
301                 $(srcdir)/$(ABASE)-menus-item_user_data.ads.m4 \
302                 $(srcdir)/normal.m4
303         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
304         $(srcdir)/$(ABASE)-menus-item_user_data.ads.m4 |\
305         $(DEL_ADAMODE) >$@
306
307 $(ADA_SRCDIR)/$(ABASE)-forms-form_user_data.ads: \
308                 $(srcdir)/$(ABASE)-forms-form_user_data.ads.m4 \
309                 $(srcdir)/normal.m4
310         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
311         $(srcdir)/$(ABASE)-forms-form_user_data.ads.m4 |\
312         $(DEL_ADAMODE) >$@
313
314 $(ADA_SRCDIR)/$(ABASE)-forms-field_types.ads: \
315                 $(srcdir)/$(ABASE)-forms-field_types.ads.m4 \
316                 $(srcdir)/normal.m4
317         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
318         $(srcdir)/$(ABASE)-forms-field_types.ads.m4 |\
319         $(DEL_ADAMODE) >$@
320
321 $(ADA_SRCDIR)/$(ABASE)-forms-field_user_data.ads: \
322                 $(srcdir)/$(ABASE)-forms-field_user_data.ads.m4 \
323                 $(srcdir)/normal.m4
324         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
325         $(srcdir)/$(ABASE)-forms-field_user_data.ads.m4 |\
326         $(DEL_ADAMODE) >$@
327
328 $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads: \
329                 $(srcdir)/$(ABASE)-panels-user_data.ads.m4 \
330                 $(srcdir)/normal.m4
331         $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
332         $(srcdir)/$(ABASE)-panels-user_data.ads.m4 |\
333         $(DEL_ADAMODE) >$@
334
335 install.progs ::
336
337 tags:
338         ctags *.[ch]
339
340 TAGS:
341         etags *.[ch]
342
343 mostlyclean ::
344         -rm -f a.out core gen *.o
345         -rm -f $(GEN_FILES1)
346         -rm -f $(GEN_FILES2)
347         -rm -f $(GEN_FILES3)
348         -rm -f $(GEN_FILES4)
349         -rm -f $(GEN_FILES5)
350
351 clean :: mostlyclean
352         -rm -f $(GEN_TARGETS)
353
354 distclean :: clean
355         rm -f Makefile
356
357 realclean :: distclean
358
359 ###############################################################################
360 # The remainder of this file is automatically generated during configuration
361 ###############################################################################