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