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