]> ncurses.scripts.mit.edu Git - ncurses.git/blob - c++/Makefile.in
e8079893736f4ce81c3a68c51df86db10bb9d8f6
[ncurses.git] / c++ / Makefile.in
1 # $Id: Makefile.in,v 1.52 2000/05/28 01:44:34 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 INSTALL_PREFIX  = @INSTALL_PREFIX@
45 srcdir          = @srcdir@
46 prefix          = @prefix@
47 exec_prefix     = @exec_prefix@
48 libdir          = @libdir@
49 includedir      = @includedir@
50
51 INSTALL         = @INSTALL@
52 INSTALL_DATA    = @INSTALL_DATA@
53
54 AR              = @AR@
55 AR_OPTS         = @AR_OPTS@
56 RANLIB          = @RANLIB@
57
58 CXX             = @CXX@
59 CXXFLAGS        = @CXXFLAGS@
60 CXXLIBS         = @CXXLIBS@
61
62 INCDIR          = ../include
63 CPPFLAGS        = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
64
65 CCFLAGS         = $(CPPFLAGS) $(CXXFLAGS)
66
67 CFLAGS_NORMAL   = $(CCFLAGS)
68 CFLAGS_DEBUG    = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
69 CFLAGS_PROFILE  = $(CCFLAGS) -pg
70 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
71
72 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
73
74 REL_VERSION     = @cf_cv_rel_version@
75 ABI_VERSION     = @cf_cv_abi_version@
76
77 LINK            = @LINK_PROGS@ $(CXX) @CXXLDFLAGS@
78
79 LIBROOT = ncurses++@LIB_SUFFIX@
80 LIBNAME = @LIB_PREFIX@$(LIBROOT).a
81
82 LDFLAGS         = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) \
83         -l$(LIBROOT) \
84         @TEST_ARGS@ @LDFLAGS@ \
85         @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
86
87 LDFLAGS_NORMAL  = $(LDFLAGS)
88 LDFLAGS_DEBUG   = $(LDFLAGS) @CC_G_OPT@
89 LDFLAGS_PROFILE = $(LDFLAGS) -pg
90 LDFLAGS_SHARED  = $(LDFLAGS) @LD_SHARED_OPTS@
91
92 LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
93
94 AUTO_SRC        = \
95                 etip.h
96
97 all \
98 libs ::         $(AUTO_SRC) ../lib/$(LIBNAME)
99
100 all ::          demo$x
101
102 sources :       $(AUTO_SRC)
103
104 # Build a conventional library for installing, since a shared library would
105 # pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
106 # dependencies.
107 LIB_OBJS = \
108         $(MODEL)/cursesf.o \
109         $(MODEL)/cursesm.o \
110         $(MODEL)/cursesw.o \
111         $(MODEL)/cursespad.o \
112         $(MODEL)/cursesp.o \
113         $(MODEL)/cursslk.o \
114         $(MODEL)/cursesapp.o \
115         $(MODEL)/cursesmain.o
116
117 ../lib/$(LIBNAME) : $(LIB_OBJS)
118         $(AR) $(AR_OPTS) $@ $?
119         $(RANLIB) $@
120
121 OBJS_DEMO = $(MODEL)/demo.o
122
123 $(MODEL)/demo.o : $(srcdir)/demo.cc \
124         $(cursesf_h) $(cursesm_h) $(cursesapp_h)
125
126 demo$x: $(OBJS_DEMO) \
127         ../lib/$(LIBNAME)  \
128         @TEST_DEPS@
129         @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
130
131 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
132         cp $(srcdir)/etip.h.in $@
133         sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
134
135 $(INSTALL_PREFIX)$(libdir) :
136         $(srcdir)/../mkinstalldirs $@
137
138 install \
139 install.libs:: ../lib/$(LIBNAME) $(INSTALL_PREFIX)$(libdir)
140         $(INSTALL) ../lib/$(LIBNAME) $(INSTALL_PREFIX)$(libdir)/$(LIBNAME)
141
142 uninstall \
143 uninstall.libs::
144         -rm -f $(INSTALL_PREFIX)$(libdir)/$(LIBNAME)
145
146 mostlyclean ::
147         -rm -f core tags TAGS *~ *.ln *.atac trace
148
149 clean :: mostlyclean
150         -rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO)
151
152 distclean :: clean
153         -rm -f Makefile
154
155 realclean :: distclean
156
157 ###############################################################################
158
159 cursesw_h       = $(srcdir)/cursesw.h \
160                   etip.h \
161                   $(INCDIR)/curses.h
162
163 cursesp_h       = $(srcdir)/cursesp.h \
164                   $(cursesw_h) \
165                   $(INCDIR)/panel.h
166
167 cursesf_h       = $(srcdir)/cursesf.h \
168                   $(cursesp_h) \
169                   $(INCDIR)/form.h
170
171 cursesm_h       = $(srcdir)/cursesm.h \
172                   $(cursesp_h) \
173                   $(INCDIR)/menu.h
174
175 cursslk_h       = $(srcdir)/cursslk.h \
176                   $(cursesw_h)
177
178 cursesapp_h     = $(srcdir)/cursesapp.h \
179                   $(cursslk_h)
180
181 $(INCDIR)/form.h :
182         cd ../form && $(MAKE) $@
183
184 $(INCDIR)/menu.h :
185         cd ../menu && $(MAKE) $@
186
187 $(INCDIR)/panel.h :
188         cd ../panel && $(MAKE) $@
189
190 ###############################################################################
191 # The remainder of this file is automatically generated during configuration
192 ###############################################################################