0
|
1 /* Makefile for Lucid Widget Library
|
|
2 Copyright (C) 1994 Lucid, Inc.
|
|
3 Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
|
|
4 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
|
|
5
|
|
6 This file is part of the Lucid Widget Library.
|
|
7
|
|
8 The Lucid Widget Library is free software; you can redistribute it and/or
|
|
9 modify it under the terms of the GNU General Public License as published by
|
|
10 the Free Software Foundation; either version 2, or (at your option)
|
|
11 any later version.
|
|
12
|
|
13 The Lucid Widget Library is distributed in the hope that it will be useful,
|
|
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 GNU General Public License for more details.
|
|
17
|
|
18 You should have received a copy of the GNU General Public License
|
80
|
19 along with XEmacs; see the file COPYING. If not, write to
|
78
|
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
21 Boston, MA 02111-1307, USA. */
|
0
|
22
|
80
|
23 /* Some people use these in paths they define. We do not want their paths
|
0
|
24 getting changed on them. */
|
|
25 #undef sparc
|
|
26 #undef sun
|
|
27 #undef unix
|
|
28 #undef sgi
|
|
29 #undef NeXT
|
149
|
30 #undef mips
|
|
31 #undef i386
|
|
32 #undef linux
|
0
|
33
|
|
34 srcdir=@srcdir@
|
149
|
35 /* C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ */
|
|
36 /* C_SWITCH_SITE=@C_SWITCH_SITE@ */
|
|
37
|
0
|
38
|
|
39 SHELL=/bin/sh
|
|
40
|
|
41 CC=@CC@
|
149
|
42 CPP=@CPP@
|
0
|
43 CFLAGS=@CFLAGS@
|
149
|
44 LDFLAGS=@LDFLAGS@
|
|
45 CPPFLAGS=@CPPFLAGS@
|
0
|
46 RANLIB=@RANLIB@
|
|
47
|
|
48 RM = rm -f
|
|
49 AR = ar cq
|
|
50 @SET_MAKE@
|
|
51
|
|
52 #define THIS_IS_YMAKEFILE
|
|
53 #define NOT_C_CODE
|
|
54 #include "../src/config.h"
|
|
55
|
|
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
|
80
|
64 The GNU Make "vpath" directive continues this tradition, but at
|
0
|
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
|
|
68 vpath %.c @srcdir@
|
|
69 vpath %.h @srcdir@
|
|
70 /* now list files that should NOT be searched in the srcdir.
|
80
|
71 This includes any .c or .h built from something else
|
0
|
72 (e.g. a .in file). */
|
|
73 /* none here */
|
|
74 #else
|
|
75 VPATH=@srcdir@
|
|
76 #endif
|
|
77
|
|
78 #ifndef C_SWITCH_MACHINE
|
|
79 #define C_SWITCH_MACHINE
|
|
80 #endif
|
|
81
|
|
82 #ifndef C_SWITCH_SYSTEM
|
|
83 #define C_SWITCH_SYSTEM
|
|
84 #endif
|
|
85
|
|
86 #ifndef C_SWITCH_X_SYSTEM
|
|
87 #define C_SWITCH_X_SYSTEM
|
|
88 #endif
|
|
89
|
|
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
|
78
|
205 #if defined (HAVE_X_WINDOWS)
|
|
206 # ifndef NEED_TOOLKIT
|
|
207 # define NEED_TOOLKIT
|
|
208 # endif
|
|
209 #endif
|
|
210
|
0
|
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
|
|
218 #else
|
|
219 all::
|
|
220 #endif
|
|
221
|
149
|
222 c_switch_general=@c_switch_general@
|
|
223 c_switch_window_system=@c_switch_window_system@
|
|
224 c_switch_all=@c_switch_all@
|
|
225 ld_switch_general=@ld_switch_general@
|
|
226 ld_switch_window_system=@ld_switch_window_system@
|
|
227 ld_switch_all=@ld_switch_all@
|
|
228 ld_libs_general=@ld_libs_general@
|
|
229 ld_libs_window_system=@ld_libs_window_system@
|
|
230 ld_libs_all=@ld_libs_all@
|
|
231
|
|
232 ALL_CFLAGS = -I. $(c_switch_all) NEED_LUCID NEED_MOTIF NEED_ATHENA \
|
0
|
233 LWLIB_MENUBARS LWLIB_SCROLLBARS LWLIB_DIALOGS \
|
|
234 $(ENERGIZEP) ${CFLAGS} CONST_FLAG
|
|
235 .c.o:
|
|
236 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
|
|
237
|
|
238 liblw.a: $(OBJS)
|
|
239 $(RM) $@
|
|
240 $(AR) $@ $(OBJS)
|
|
241 -if [ -n $(RANLIB) ]; then \
|
|
242 $(RANLIB) $@; \
|
|
243 fi
|
|
244
|
|
245 #ifdef ENERGIZE
|
|
246 ez_dialog:
|
80
|
247 cd energize && $(MAKE) $(MFLAGS)
|
0
|
248 #endif
|
|
249
|
|
250 FRC.mostlyclean:
|
|
251 mostlyclean: FRC.mostlyclean
|
|
252 rm -f liblw.a liblw_pure_*.a *.o
|
|
253 clean: mostlyclean
|
|
254 #ifdef ENERGIZE
|
80
|
255 cd energize && $(MAKE) $(MFLAGS) clean
|
0
|
256 #endif
|
|
257 distclean: clean
|
151
|
258 rm -f Makefile Makefile.in config.h .pure
|
0
|
259 realclean: distclean
|
|
260 extraclean: distclean
|
|
261 -rm -f *~ \#* m/?*~ s/?*~
|
|
262
|
|
263
|
|
264 lwlib-config.o: lwlib.h ../src/config.h
|
|
265 lwlib-Xaw.o: lwlib.h lwlib-internal.h lwlib-Xaw.h ../src/config.h
|
|
266 lwlib-Xlw.o: lwlib.h lwlib-internal.h lwlib-Xlw.h xlwmenu.h ../src/config.h
|
|
267 lwlib-Xm.o: lwlib.h lwlib-internal.h lwlib-utils.h lwlib-Xm.h
|
|
268 lwlib-Xm.o: ../src/config.h
|
|
269 lwlib-utils.o: lwlib-utils.h ../src/config.h
|
|
270 lwlib.o: lwlib.h lwlib-internal.h lwlib-utils.h ../src/config.h
|
|
271 lwlib.o: lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h ../src/config.h
|
|
272 xlwmenu.o: lwlib.h xlwmenu.h xlwmenuP.h ../src/config.h
|
|
273 xlwscrollbar.o: lwlib.h xlwscrollbar.h xlwscrollbarP.h ../src/config.h
|