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