comparison lwlib/Makefile.in.in @ 157:6b37e6ddd302 r20-3b5

Import from CVS: tag r20-3b5
author cvs
date Mon, 13 Aug 2007 09:40:41 +0200
parents 59463afc5666
children 3bb7ccffb0c0
comparison
equal deleted inserted replaced
156:60baf0b43294 157:6b37e6ddd302
30 #undef mips 30 #undef mips
31 #undef i386 31 #undef i386
32 #undef linux 32 #undef linux
33 33
34 srcdir=@srcdir@ 34 srcdir=@srcdir@
35 /* C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ */
36 /* C_SWITCH_SITE=@C_SWITCH_SITE@ */
37
38 35
39 SHELL=/bin/sh 36 SHELL=/bin/sh
40 37
41 CC=@CC@ 38 CC=@CC@
42 CPP=@CPP@ 39 CPP=@CPP@
47 44
48 RM = rm -f 45 RM = rm -f
49 AR = ar cq 46 AR = ar cq
50 @SET_MAKE@ 47 @SET_MAKE@
51 48
52 #define THIS_IS_YMAKEFILE
53 #define NOT_C_CODE 49 #define NOT_C_CODE
54 #include "../src/config.h" 50 #include "../src/config.h"
55 51
56 /* With the traditional VPATH setting, it is not possible to
57 simultaneously compile in-place and in another directory. The
58 mistaken definition is that *all* dependencies are searched for in
59 the VPATH directory, rather than just the dependencies that are not
60 themselves targets. Thus, if there is an up-to-date .o file in the
61 in-place location, it will not get recompiled in the not-in-place
62 location.
63
64 The GNU Make "vpath" directive continues this tradition, but at
65 least lets you restrict the classes of files that it applies to.
66 This allows us to kludge around the problem. */
67 #ifdef USE_GNU_MAKE 52 #ifdef USE_GNU_MAKE
68 vpath %.c @srcdir@ 53 vpath %.c @srcdir@
69 vpath %.h @srcdir@ 54 vpath %.h @srcdir@
70 /* now list files that should NOT be searched in the srcdir.
71 This includes any .c or .h built from something else
72 (e.g. a .in file). */
73 /* none here */
74 #else 55 #else
75 VPATH=@srcdir@ 56 VPATH=@srcdir@
76 #endif 57 #endif
77 58
78 #ifndef C_SWITCH_MACHINE 59 #ifdef ENERGIZE
79 #define C_SWITCH_MACHINE 60 EZ_OBJS =\
61 energize/blpsheet.o energize/build.o energize/classbr_ps.o \
62 energize/ctreebr_ps.o energize/debuggerps.o energize/editmode.o \
63 energize/leb_psheet.o energize/projectdisp.o energize/projectps.o \
64 energize/search.o energize/target.o
65 ENERGIZEP = -DENERGIZE
66 EZ_SUBDIR = ez_dialog
80 #endif 67 #endif
81 68
82 #ifndef C_SWITCH_SYSTEM 69 lwlib_objs=@lwlib_objs@
83 #define C_SWITCH_SYSTEM
84 #endif
85 70
86 #ifndef C_SWITCH_X_SYSTEM 71 OBJS = lwlib.o lwlib-utils.o lwlib-config.o $(EZ_OBJS) ${lwlib_objs}
87 #define C_SWITCH_X_SYSTEM
88 #endif
89 72
90 #ifndef C_SWITCH_X_MACHINE
91 #define C_SWITCH_X_MACHINE
92 #endif
93
94 #if defined (CONST_IS_LOSING)
95 # define CONST_FLAG -DCONST_IS_LOSING
96 #else
97 # define CONST_FLAG
98 #endif
99
100 #if defined (LWLIB_MENUBARS_LUCID)
101 # define LWLIB_MENUBARS -DMENUBARS_LUCID
102 #else
103 # if defined (LWLIB_MENUBARS_MOTIF)
104 # define LWLIB_MENUBARS -DMENUBARS_MOTIF
105 # else
106 # define LWLIB_MENUBARS
107 # endif
108 #endif
109
110 #if defined (LWLIB_SCROLLBARS_LUCID)
111 # define LWLIB_SCROLLBARS -DSCROLLBARS_LUCID
112 #else
113 # if defined (LWLIB_SCROLLBARS_MOTIF)
114 # define LWLIB_SCROLLBARS -DSCROLLBARS_MOTIF
115 # else
116 # if defined (LWLIB_SCROLLBARS_ATHENA)
117 # define LWLIB_SCROLLBARS -DSCROLLBARS_ATHENA
118 # else
119 # define LWLIB_SCROLLBARS
120 # endif
121 # endif
122 #endif
123
124 #if defined (LWLIB_DIALOGS_MOTIF)
125 # define LWLIB_DIALOGS -DDIALOGS_MOTIF
126 #else
127 # if defined (LWLIB_DIALOGS_ATHENA)
128 # define LWLIB_DIALOGS -DDIALOGS_ATHENA
129 # else
130 # define LWLIB_DIALOGS
131 # endif
132 #endif
133
134 #undef NEED_TOOLKIT
135
136 /* If Motif was chosen as the tookit for anything, then
137 LWLIB_USES_MOTIF should have gotten defined. */
138 #if defined (LWLIB_USES_MOTIF)
139 # ifndef NEED_TOOLKIT
140 # define NEED_TOOLKIT
141 # endif
142 # define NEED_MOTIF -DNEED_MOTIF
143 # define MOTIF_SRCS lwlib-Xm.c
144 # define MOTIF_OBJS lwlib-Xm.o
145 #else
146 # define NEED_MOTIF
147 # define MOTIF_SRCS
148 # define MOTIF_OBJS
149 #endif
150
151 #if defined (LWLIB_MENUBARS_LUCID) || defined (LWLIB_SCROLLBARS_LUCID)
152 # ifndef NEED_TOOLKIT
153 # define NEED_TOOLKIT
154 # endif
155 # define NEED_LUCID -DNEED_LUCID
156 # ifdef LWLIB_MENUBARS_LUCID
157 # define LUCID_MENUBAR_SRCS xlwmenu.c
158 # define LUCID_MENUBAR_OBJS xlwmenu.o
159 # else
160 # define LUCID_MENUBAR_SRCS
161 # define LUCID_MENUBAR_OBJS
162 # endif
163 # ifdef LWLIB_SCROLLBARS_LUCID
164 # define LUCID_SCROLLBAR_SRCS xlwscrollbar.c
165 # define LUCID_SCROLLBAR_OBJS xlwscrollbar.o
166 # else
167 # define LUCID_SCROLLBAR_SRCS
168 # define LUCID_SCROLLBAR_OBJS
169 # endif
170 # define LUCID_SRCS lwlib-Xlw.c LUCID_MENUBAR_SRCS LUCID_SCROLLBAR_SRCS
171 # define LUCID_OBJS lwlib-Xlw.o LUCID_MENUBAR_OBJS LUCID_SCROLLBAR_OBJS
172 #else
173 # define NEED_LUCID
174 # define LUCID_SRCS
175 # define LUCID_OBJS
176 #endif
177
178 #if defined (LWLIB_SCROLLBARS_ATHENA) || defined (LWLIB_DIALOGS_ATHENA)
179 # ifndef NEED_TOOLKIT
180 # define NEED_TOOLKIT
181 # endif
182 # define NEED_ATHENA -DNEED_ATHENA
183 # define ATHENA_SRCS lwlib-Xaw.c
184 # define ATHENA_OBJS lwlib-Xaw.o
185 #else
186 # define NEED_ATHENA
187 # define ATHENA_SRCS
188 # define ATHENA_OBJS
189 #endif
190
191 #ifdef ENERGIZE
192 EZ_OBJS = energize/blpsheet.o energize/build.o energize/classbr_ps.o \
193 energize/ctreebr_ps.o energize/debuggerps.o \
194 energize/editmode.o energize/leb_psheet.o \
195 energize/projectdisp.o energize/projectps.o \
196 energize/search.o energize/target.o
197 ENERGIZEP = -DENERGIZE
198 EZ_SUBDIR = ez_dialog
199 #else
200 EZ_OBJS =
201 ENERGIZEP =
202 EZ_SUBDIR =
203 #endif
204
205 #if defined (HAVE_X_WINDOWS)
206 # ifndef NEED_TOOLKIT
207 # define NEED_TOOLKIT
208 # endif
209 #endif
210
211 SRCS = lwlib.c MOTIF_SRCS LUCID_SRCS ATHENA_SRCS lwlib-utils.c \
212 lwlib-config.c
213 OBJS = lwlib.o MOTIF_OBJS LUCID_OBJS ATHENA_OBJS lwlib-utils.o \
214 lwlib-config.o $(EZ_OBJS)
215
216 #ifdef NEED_TOOLKIT
217 all:: $(EZ_SUBDIR) liblw.a 73 all:: $(EZ_SUBDIR) liblw.a
218 #else
219 all::
220 #endif
221 74
222 c_switch_general=@c_switch_general@ 75 c_switch_general=@c_switch_general@
223 c_switch_window_system=@c_switch_window_system@ 76 c_switch_window_system=@c_switch_window_system@
224 c_switch_all=@c_switch_all@ 77 c_switch_all=@c_switch_all@
225 ld_switch_general=@ld_switch_general@ 78 ld_switch_general=@ld_switch_general@
227 ld_switch_all=@ld_switch_all@ 80 ld_switch_all=@ld_switch_all@
228 ld_libs_general=@ld_libs_general@ 81 ld_libs_general=@ld_libs_general@
229 ld_libs_window_system=@ld_libs_window_system@ 82 ld_libs_window_system=@ld_libs_window_system@
230 ld_libs_all=@ld_libs_all@ 83 ld_libs_all=@ld_libs_all@
231 84
232 ALL_CFLAGS = -I. $(c_switch_all) NEED_LUCID NEED_MOTIF NEED_ATHENA \ 85 ALL_CFLAGS= $(CFLAGS) $(CPPFLAGS) -I. $(c_switch_all) $(ENERGIZEP)
233 LWLIB_MENUBARS LWLIB_SCROLLBARS LWLIB_DIALOGS \
234 $(ENERGIZEP) ${CFLAGS} CONST_FLAG
235 .c.o: 86 .c.o:
236 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 87 $(CC) -c $(ALL_CFLAGS) $<
237 88
238 liblw.a: $(OBJS) 89 liblw.a: $(OBJS)
239 $(RM) $@ 90 $(RM) $@
240 $(AR) $@ $(OBJS) 91 $(AR) $@ $(OBJS)
241 -if [ -n $(RANLIB) ]; then \ 92 -test -n "$(RANLIB)" && $(RANLIB) $@
242 $(RANLIB) $@; \
243 fi
244 93
245 #ifdef ENERGIZE 94 #ifdef ENERGIZE
246 ez_dialog: 95 ez_dialog:
247 cd energize && $(MAKE) $(MFLAGS) 96 cd energize && $(MAKE) $(MFLAGS)
248 #endif 97 #endif