e5cb748188fc22408942703557d75ea1295771f0
[ncurses.git] / test / Makefile.in
1 # $Id: Makefile.in,v 1.77 2003/12/07 01:36:16 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.                #
4 #                                                                            #
5 # Permission is hereby granted, free of charge, to any person obtaining a    #
6 # copy of this software and associated documentation files (the "Software"), #
7 # to deal in the Software without restriction, including without limitation  #
8 # the rights to use, copy, modify, merge, publish, distribute, distribute    #
9 # with modifications, sublicense, and/or sell copies of the Software, and to #
10 # permit persons to whom the Software is furnished to do so, subject to the  #
11 # following conditions:                                                      #
12 #                                                                            #
13 # The above copyright notice and this permission notice shall be included in #
14 # all copies or substantial portions of the Software.                        #
15 #                                                                            #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
19 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
22 # DEALINGS IN THE SOFTWARE.                                                  #
23 #                                                                            #
24 # Except as contained in this notice, the name(s) of the above copyright     #
25 # holders shall not be used in advertising or otherwise to promote the sale, #
26 # use or other dealings in this Software without prior written               #
27 # authorization.                                                             #
28 ##############################################################################
29 #
30 # Author: Thomas E. Dickey 1996-2002
31 #
32 # Makefile for ncurses tests.
33
34 # turn off _all_ suffix rules; we'll generate our own
35 .SUFFIXES:
36
37 SHELL           = /bin/sh
38
39 @SET_MAKE@
40
41 x               = @EXEEXT@
42 o               = .@OBJEXT@
43
44 MODEL           = ../@DFT_OBJ_SUBDIR@
45 srcdir          = @srcdir@
46 prefix          = @prefix@
47 exec_prefix     = @exec_prefix@
48 libdir          = @libdir@
49 includedir      = @includedir@
50
51 LIBTOOL         = @LIBTOOL@
52 LIBTOOL_CLEAN   = @LIB_CLEAN@
53 LIBTOOL_COMPILE = @LIB_COMPILE@
54 LIBTOOL_LINK    = @LIB_LINK@
55
56 CC              = @CC@
57 CPP             = @CPP@
58
59 CFLAGS          = @CFLAGS@
60 CPPFLAGS        =  -I../test -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
61
62 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
63
64 CFLAGS_LIBTOOL  = $(CCFLAGS)
65 CFLAGS_NORMAL   = $(CCFLAGS)
66 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
67 CFLAGS_PROFILE  = $(CCFLAGS) -pg
68 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
69
70 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
71
72 REL_VERSION     = @cf_cv_rel_version@
73 ABI_VERSION     = @cf_cv_abi_version@
74 LOCAL_LIBS      = @TEST_DEPS@
75 MATH_LIB        = @MATH_LIB@
76
77 LD              = @LD@
78 LINK            = @LINK_TESTS@ $(LIBTOOL_LINK) $(CC) $(CFLAGS)
79
80 LDFLAGS         = @LD_MODEL@ @TEST_ARGS@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
81
82 LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
83 LDFLAGS_NORMAL  = $(LDFLAGS) $(CFLAGS_NORMAL)
84 LDFLAGS_DEBUG   = $(LDFLAGS) $(CFLAGS_DEBUG)
85 LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
86 LDFLAGS_SHARED  = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
87
88 LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
89
90 LINT            = @LINT@
91 LINT_OPTS       = @LINT_OPTS@
92 LINT_LIBS       = -lform -lmenu -lpanel -lncurses @LIBS@
93
94 TESTS = \
95         background$x \
96         blue$x \
97         bs$x \
98         cardfile$x \
99         color_set$x \
100         demo_defkey$x \
101         demo_forms$x \
102         demo_keyok$x \
103         demo_menus$x \
104         demo_panels$x \
105         ditto$x \
106         dots$x \
107         filter$x \
108         firework$x \
109         firstlast$x \
110         gdc$x \
111         hanoi$x \
112         hashtest$x \
113         ins_wide$x \
114         inserts$x \
115         keynames$x \
116         knight$x \
117         lrtest$x \
118         ncurses$x \
119         newdemo$x \
120         railroad$x \
121         rain$x \
122         tclock$x \
123         testaddch$x \
124         testcurs$x \
125         testscanw$x \
126         view$x \
127         worm$x \
128         xmas$x
129
130 all: $(TESTS)
131
132 sources:
133
134 background$x: $(MODEL)/background$o $(LOCAL_LIBS)
135         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/background$o $(LDFLAGS_DEFAULT)
136
137 blue$x: $(MODEL)/blue$o $(LOCAL_LIBS)
138         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/blue$o $(LDFLAGS_DEFAULT)
139
140 bs$x: $(MODEL)/bs$o $(LOCAL_LIBS)
141         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/bs$o $(LDFLAGS_DEFAULT)
142
143 cardfile$x: $(MODEL)/cardfile$o $(LOCAL_LIBS)
144         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/cardfile$o $(LDFLAGS_DEFAULT)
145
146 color_set$x: $(MODEL)/color_set$o $(LOCAL_LIBS)
147         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/color_set$o $(LDFLAGS_DEFAULT)
148
149 demo_defkey$x: $(MODEL)/demo_defkey$o $(LOCAL_LIBS)
150         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_defkey$o $(LDFLAGS_DEFAULT)
151
152 demo_forms$x: $(MODEL)/demo_forms$o $(MODEL)/edit_field$o $(LOCAL_LIBS)
153         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_forms$o $(MODEL)/edit_field$o $(LDFLAGS_DEFAULT)
154
155 demo_keyok$x: $(MODEL)/demo_keyok$o $(LOCAL_LIBS)
156         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_keyok$o $(LDFLAGS_DEFAULT)
157
158 demo_menus$x: $(MODEL)/demo_menus$o $(LOCAL_LIBS)
159         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_menus$o $(LDFLAGS_DEFAULT)
160
161 demo_panels$x: $(MODEL)/demo_panels$o $(LOCAL_LIBS)
162         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_panels$o $(LDFLAGS_DEFAULT)
163
164 ditto$x: $(MODEL)/ditto$o $(LOCAL_LIBS)
165         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ditto$o $(LDFLAGS_DEFAULT)
166
167 dots$x: $(MODEL)/dots$o $(LOCAL_LIBS)
168         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/dots$o $(LDFLAGS_DEFAULT)
169
170 filter$x: $(MODEL)/filter$o $(LOCAL_LIBS)
171         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/filter$o $(LDFLAGS_DEFAULT)
172
173 firework$x: $(MODEL)/firework$o $(LOCAL_LIBS)
174         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firework$o $(LDFLAGS_DEFAULT)
175
176 firstlast$x: $(MODEL)/firstlast$o $(LOCAL_LIBS)
177         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firstlast$o $(LDFLAGS_DEFAULT)
178
179 gdc$x: $(MODEL)/gdc$o $(LOCAL_LIBS)
180         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/gdc$o $(LDFLAGS_DEFAULT)
181
182 hanoi$x: $(MODEL)/hanoi$o $(LOCAL_LIBS)
183         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hanoi$o $(LDFLAGS_DEFAULT)
184
185 hashtest$x: $(MODEL)/hashtest$o $(LOCAL_LIBS)
186         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hashtest$o $(LDFLAGS_DEFAULT)
187
188 inserts$x: $(MODEL)/inserts$o $(LOCAL_LIBS)
189         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/inserts$o $(LDFLAGS_DEFAULT)
190
191 ins_wide$x: $(MODEL)/ins_wide$o $(LOCAL_LIBS)
192         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ins_wide$o $(LDFLAGS_DEFAULT)
193
194 keynames$x: $(MODEL)/keynames$o $(LOCAL_LIBS)
195         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/keynames$o $(LDFLAGS_DEFAULT)
196
197 knight$x: $(MODEL)/knight$o $(LOCAL_LIBS)
198         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/knight$o $(LDFLAGS_DEFAULT)
199
200 lrtest$x: $(MODEL)/lrtest$o $(LOCAL_LIBS)
201         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/lrtest$o $(LDFLAGS_DEFAULT)
202
203 ncurses$x: $(MODEL)/ncurses$o $(LOCAL_LIBS)
204         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ncurses$o $(LDFLAGS_DEFAULT)
205
206 newdemo$x: $(MODEL)/newdemo$o $(LOCAL_LIBS)
207         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/newdemo$o $(LDFLAGS_DEFAULT)
208
209 rain$x: $(MODEL)/rain$o $(LOCAL_LIBS)
210         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/rain$o $(LDFLAGS_DEFAULT)
211
212 railroad$x: $(MODEL)/railroad$o $(LOCAL_LIBS)
213         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/railroad$o $(LDFLAGS_DEFAULT)
214
215 tclock$x: $(MODEL)/tclock$o $(LOCAL_LIBS)
216         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/tclock$o $(LDFLAGS_DEFAULT) $(MATH_LIB)
217
218 testaddch$x: $(MODEL)/testaddch$o $(LOCAL_LIBS)
219         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testaddch$o $(LDFLAGS_DEFAULT)
220
221 testcurs$x: $(MODEL)/testcurs$o $(LOCAL_LIBS)
222         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testcurs$o $(LDFLAGS_DEFAULT)
223
224 testscanw$x: $(MODEL)/testscanw$o $(LOCAL_LIBS)
225         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testscanw$o $(LDFLAGS_DEFAULT)
226
227 view$x: $(MODEL)/view$o $(LOCAL_LIBS)
228         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/view$o $(LDFLAGS_DEFAULT)
229
230 worm$x: $(MODEL)/worm$o $(LOCAL_LIBS)
231         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/worm$o $(LDFLAGS_DEFAULT)
232
233 xmas$x: $(MODEL)/xmas$o $(LOCAL_LIBS)
234         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/xmas$o $(LDFLAGS_DEFAULT)
235
236 libs \
237 install \
238 install.libs \
239 install.test:
240
241 uninstall:
242 uninstall.libs:
243 uninstall.test:
244
245 mostlyclean ::
246         -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
247
248 clean :: mostlyclean
249         -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
250         -rm -rf *$o screendump *.lis $(TESTS) .libs
251
252 distclean :: clean
253         -rm -f Makefile ncurses_cfg.h config.*
254
255 realclean :: distclean
256
257 lint:
258         sh -c 'for N in $(TESTS); do echo LINT:$$N; $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/$$N.c $(LINT_LIBS); done'