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