4cab57422b47c8e29132bd6b46d12f75de67e342
[ncurses.git] / test / Makefile.in
1 # $Id: Makefile.in,v 1.60 2000/10/14 22:51:19 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998,1999,2000 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 <dickey@clark.net> 1996,1997,1998
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 x               = @PROG_EXT@
40
41 MODEL           = ../@DFT_OBJ_SUBDIR@
42 srcdir          = @srcdir@
43 prefix          = @prefix@
44 exec_prefix     = @exec_prefix@
45 libdir          = @libdir@
46 includedir      = @includedir@
47
48 LIBTOOL         = @LIBTOOL@
49
50 CC              = @CC@
51 CPP             = @CPP@
52
53 CFLAGS          = @CFLAGS@
54 CPPFLAGS        =  -I../test -I$(srcdir) @CPPFLAGS@ -DHAVE_CONFIG_H
55
56 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
57
58 CFLAGS_LIBTOOL  = $(CCFLAGS)
59 CFLAGS_NORMAL   = $(CCFLAGS)
60 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
61 CFLAGS_PROFILE  = $(CCFLAGS) -pg
62 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
63
64 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
65
66 REL_VERSION     = @cf_cv_rel_version@
67 ABI_VERSION     = @cf_cv_abi_version@
68 LOCAL_LIBS      = @TEST_DEPS@
69 MATH_LIB        = @MATH_LIB@
70
71 LD              = @LD@
72 LINK            = @LINK_TESTS@ $(LIBTOOL) $(CC)
73
74 LDFLAGS         = @LD_MODEL@ @TEST_ARGS@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
75
76 LDFLAGS_LIBTOOL = $(LDFLAGS)
77 LDFLAGS_NORMAL  = $(LDFLAGS)
78 LDFLAGS_DEBUG   = $(LDFLAGS) @CC_G_OPT@
79 LDFLAGS_PROFILE = $(LDFLAGS) -pg
80 LDFLAGS_SHARED  = $(LDFLAGS) @LD_SHARED_OPTS@
81
82 LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
83
84 LINT            = @LINT@
85 LINT_OPTS       = @LINT_OPTS@
86 LINT_LIBS       = -lform -lmenu -lpanel -lncurses @LIBS@
87
88 TESTS = \
89         blue$x \
90         bs$x \
91         cardfile$x \
92         ditto$x \
93         dots$x \
94         filter$x \
95         firework$x \
96         firstlast$x \
97         gdc$x \
98         hanoi$x \
99         hashtest$x \
100         keynames$x \
101         knight$x \
102         lrtest$x \
103         ncurses$x \
104         newdemo$x \
105         rain$x \
106         railroad$x \
107         tclock$x \
108         testaddch$x \
109         testcurs$x \
110         testscanw$x \
111         view$x \
112         worm$x \
113         xmas$x
114
115 all: $(TESTS)
116
117 sources:
118
119 blue$x: $(MODEL)/blue.o $(LOCAL_LIBS)
120         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/blue.o $(LDFLAGS_DEFAULT)
121
122 bs$x: $(MODEL)/bs.o $(LOCAL_LIBS)
123         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/bs.o $(LDFLAGS_DEFAULT)
124
125 cardfile$x: $(MODEL)/cardfile.o $(LOCAL_LIBS)
126         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/cardfile.o $(LDFLAGS_DEFAULT)
127
128 ditto$x: $(MODEL)/ditto.o $(LOCAL_LIBS)
129         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ditto.o $(LDFLAGS_DEFAULT)
130
131 dots$x: $(MODEL)/dots.o $(LOCAL_LIBS)
132         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/dots.o $(LDFLAGS_DEFAULT)
133
134 filter$x: $(MODEL)/filter.o $(LOCAL_LIBS)
135         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/filter.o $(LDFLAGS_DEFAULT)
136
137 firework$x: $(MODEL)/firework.o $(LOCAL_LIBS)
138         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firework.o $(LDFLAGS_DEFAULT)
139
140 firstlast$x: $(MODEL)/firstlast.o $(LOCAL_LIBS)
141         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firstlast.o $(LDFLAGS_DEFAULT)
142
143 gdc$x: $(MODEL)/gdc.o $(LOCAL_LIBS)
144         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/gdc.o $(LDFLAGS_DEFAULT)
145
146 hanoi$x: $(MODEL)/hanoi.o $(LOCAL_LIBS)
147         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hanoi.o $(LDFLAGS_DEFAULT)
148
149 hashtest$x: $(MODEL)/hashtest.o $(LOCAL_LIBS)
150         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hashtest.o $(LDFLAGS_DEFAULT)
151
152 keynames$x: $(MODEL)/keynames.o $(LOCAL_LIBS)
153         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/keynames.o $(LDFLAGS_DEFAULT)
154
155 knight$x: $(MODEL)/knight.o $(LOCAL_LIBS)
156         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/knight.o $(LDFLAGS_DEFAULT)
157
158 lrtest$x: $(MODEL)/lrtest.o $(LOCAL_LIBS)
159         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/lrtest.o $(LDFLAGS_DEFAULT)
160
161 ncurses$x: $(MODEL)/ncurses.o $(LOCAL_LIBS)
162         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ncurses.o $(LDFLAGS_DEFAULT)
163
164 newdemo$x: $(MODEL)/newdemo.o $(LOCAL_LIBS)
165         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/newdemo.o $(LDFLAGS_DEFAULT)
166
167 rain$x: $(MODEL)/rain.o $(LOCAL_LIBS)
168         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/rain.o $(LDFLAGS_DEFAULT)
169
170 railroad$x: $(MODEL)/railroad.o $(LOCAL_LIBS)
171         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/railroad.o $(LDFLAGS_DEFAULT)
172
173 tclock$x: $(MODEL)/tclock.o $(LOCAL_LIBS)
174         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/tclock.o $(LDFLAGS_DEFAULT) $(MATH_LIB)
175
176 testaddch$x: $(MODEL)/testaddch.o $(LOCAL_LIBS)
177         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testaddch.o $(LDFLAGS_DEFAULT)
178
179 testcurs$x: $(MODEL)/testcurs.o $(LOCAL_LIBS)
180         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testcurs.o $(LDFLAGS_DEFAULT)
181
182 testscanw$x: $(MODEL)/testscanw.o $(LOCAL_LIBS)
183         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testscanw.o $(LDFLAGS_DEFAULT)
184
185 view$x: $(MODEL)/view.o $(LOCAL_LIBS)
186         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/view.o $(LDFLAGS_DEFAULT)
187
188 worm$x: $(MODEL)/worm.o $(LOCAL_LIBS)
189         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/worm.o $(LDFLAGS_DEFAULT)
190
191 xmas$x: $(MODEL)/xmas.o $(LOCAL_LIBS)
192         @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/xmas.o $(LDFLAGS_DEFAULT)
193
194 libs \
195 install \
196 install.libs \
197 install.test:
198
199 uninstall:
200 uninstall.libs:
201 uninstall.test:
202
203 mostlyclean ::
204         -rm -f core tags TAGS *~ *.ln *.atac trace
205
206 clean :: mostlyclean
207         -rm -rf *.o screendump *.lis $(TESTS) .libs
208
209 distclean :: clean
210         -rm -f Makefile ncurses_cfg.h config.*
211
212 realclean :: distclean
213
214 lint:
215         sh -c 'for N in $(TESTS); do echo LINT:$$N; $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/$$N.c $(LINT_LIBS); done'
216
217 # Use this to get a list of test-programs for the standalone configure script.
218 echo_tests :
219         @echo "$(TESTS)"
220 echo_suffix :
221         @echo "$x"