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