]> ncurses.scripts.mit.edu Git - ncurses.git/blob - c++/Makefile.in
630499450afe2953b18d9a99bd0c92b27db30ed5
[ncurses.git] / c++ / Makefile.in
1 # $Id: Makefile.in,v 1.56 2000/10/15 00:43:38 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998,1999 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
31 #
32 #  Simple makefile for c++ window class demo
33
34 # turn off _all_ suffix rules; we'll generate our own
35 .SUFFIXES:
36
37 SHELL           = /bin/sh
38
39 CF_MFLAGS       = @cf_cv_makeflags@
40 @SET_MAKE@
41 x               = @PROG_EXT@
42
43 MODEL           = ../@DFT_OBJ_SUBDIR@
44 DESTDIR         = @DESTDIR@
45 srcdir          = @srcdir@
46 prefix          = @prefix@
47 exec_prefix     = @exec_prefix@
48 libdir          = @libdir@
49 includedir      = @includedir@
50
51 LIBTOOL         = @LIBTOOL@
52
53 INSTALL         = @INSTALL@
54 INSTALL_DATA    = @INSTALL_DATA@
55
56 AR              = @AR@
57 AR_OPTS         = @AR_OPTS@
58 RANLIB          = @RANLIB@
59
60 CXX             = @CXX@
61 CXXFLAGS        = @CXXFLAGS@
62 CXXLIBS         = @CXXLIBS@
63
64 INCDIR          = ../include
65 CPPFLAGS        = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
66
67 CCFLAGS         = $(CPPFLAGS) $(CXXFLAGS)
68
69 CFLAGS_LIBTOOL  = $(CCFLAGS)
70 CFLAGS_NORMAL   = $(CCFLAGS)
71 CFLAGS_DEBUG    = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
72 CFLAGS_PROFILE  = $(CCFLAGS) -pg
73 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
74
75 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
76
77 NCURSES_MAJOR   = @NCURSES_MAJOR@
78 NCURSES_MINOR   = @NCURSES_MINOR@
79 REL_VERSION     = @cf_cv_rel_version@
80 ABI_VERSION     = @cf_cv_abi_version@
81
82 LINK            = @LINK_PROGS@ $(LIBTOOL) $(CXX) @CXXLDFLAGS@
83
84 LIBROOT         = ncurses++
85
86 LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
87 LIBNAME_NORMAL  = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
88 LIBNAME         = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
89
90 LINK_FLAGS      = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) -l$(LIBROOT)
91
92 LINK_LIBTOOL    = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) ../lib/$(LIBNAME)
93 LINK_NORMAL     = $(LINK_FLAGS)
94 LINK_DEBUG      = $(LINK_FLAGS)
95 LINK_PROFILE    = $(LINK_FLAGS)
96 LINK_SHARED     = $(LINK_FLAGS)
97
98 LDFLAGS         = @TEST_ARGS@ @LDFLAGS@ \
99         @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
100
101 LDFLAGS_LIBTOOL = $(LDFLAGS)
102 LDFLAGS_NORMAL  = $(LDFLAGS)
103 LDFLAGS_DEBUG   = $(LDFLAGS) @CC_G_OPT@
104 LDFLAGS_PROFILE = $(LDFLAGS) -pg
105 LDFLAGS_SHARED  = $(LDFLAGS) @LD_SHARED_OPTS@
106
107 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
108
109 AUTO_SRC        = \
110                 etip.h
111
112 all \
113 libs ::         $(AUTO_SRC) ../lib/$(LIBNAME)
114
115 all ::          demo$x
116
117 sources :       $(AUTO_SRC)
118
119 # Build a conventional library for installing, since a shared library would
120 # pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
121 # dependencies.
122 LIB_OBJS = \
123         $(MODEL)/cursesf.o \
124         $(MODEL)/cursesm.o \
125         $(MODEL)/cursesw.o \
126         $(MODEL)/cursespad.o \
127         $(MODEL)/cursesp.o \
128         $(MODEL)/cursslk.o \
129         $(MODEL)/cursesapp.o \
130         $(MODEL)/cursesmain.o
131
132 ../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
133         $(AR) $(AR_OPTS) $@ $?
134         $(RANLIB) $@
135
136 ../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
137         cd ../lib && $(LIBTOOL) $(CXX) -o $(LIBNAME) $(LIB_OBJS:.o=.lo) \
138                 -rpath $(INSTALL_PREFIX)$(libdir) \
139                 -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR)
140
141 OBJS_DEMO = $(MODEL)/demo.o
142
143 $(MODEL)/demo.o : $(srcdir)/demo.cc \
144         $(cursesf_h) $(cursesm_h) $(cursesapp_h)
145
146 demo$x: $(OBJS_DEMO) \
147         ../lib/$(LIBNAME)  \
148         @TEST_DEPS@
149         @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
150
151 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
152         cp $(srcdir)/etip.h.in $@
153         sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
154
155 $(DESTDIR)$(libdir) :
156         $(srcdir)/../mkinstalldirs $@
157
158 install \
159 install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
160         $(LIBTOOL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
161
162 uninstall \
163 uninstall.libs::
164         -$(LIBTOOL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
165
166 mostlyclean ::
167         -rm -f core tags TAGS *~ *.ln *.atac trace
168
169 clean :: mostlyclean
170         -$(LIBTOOL) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(LIB_OBJS:.o=.lo) $(OBJS_DEMO)
171         -rm -rf .libs
172
173 distclean :: clean
174         -rm -f Makefile
175
176 realclean :: distclean
177
178 ###############################################################################
179
180 cursesw_h       = $(srcdir)/cursesw.h \
181                   etip.h \
182                   $(INCDIR)/curses.h
183
184 cursesp_h       = $(srcdir)/cursesp.h \
185                   $(cursesw_h) \
186                   $(INCDIR)/panel.h
187
188 cursesf_h       = $(srcdir)/cursesf.h \
189                   $(cursesp_h) \
190                   $(INCDIR)/form.h
191
192 cursesm_h       = $(srcdir)/cursesm.h \
193                   $(cursesp_h) \
194                   $(INCDIR)/menu.h
195
196 cursslk_h       = $(srcdir)/cursslk.h \
197                   $(cursesw_h)
198
199 cursesapp_h     = $(srcdir)/cursesapp.h \
200                   $(cursslk_h)
201
202 $(INCDIR)/form.h :
203         cd ../form && $(MAKE) $@
204
205 $(INCDIR)/menu.h :
206         cd ../menu && $(MAKE) $@
207
208 $(INCDIR)/panel.h :
209         cd ../panel && $(MAKE) $@
210
211 ###############################################################################
212 # The remainder of this file is automatically generated during configuration
213 ###############################################################################