163
|
1 ## Makefile for src subdirectory in XEmacs.
|
|
2 ## Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
|
|
3 ## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
|
|
4 ## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
|
0
|
5
|
163
|
6 ## This file is part of XEmacs.
|
0
|
7
|
163
|
8 ## XEmacs is free software; you can redistribute it and/or modify it
|
|
9 ## under the terms of the GNU General Public License as published by the
|
|
10 ## Free Software Foundation; either version 2, or (at your option) any
|
|
11 ## later version.
|
0
|
12
|
163
|
13 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
14 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
15 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
16 ## for more details.
|
0
|
17
|
163
|
18 ## You should have received a copy of the GNU General Public License
|
|
19 ## along with XEmacs; see the file COPYING. If not, write to
|
|
20 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
21 ## Boston, MA 02111-1307, USA.
|
0
|
22
|
163
|
23 ## Synched up with: Not synched with FSF.
|
0
|
24
|
280
|
25 PROGNAME=@PROGNAME@
|
|
26
|
|
27 all: ${PROGNAME}
|
183
|
28 .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
|
0
|
29
|
163
|
30 ## For performance and consistency, no built-in rules.
|
70
|
31 .SUFFIXES:
|
272
|
32 .SUFFIXES: .c .h .o .i .s .dep
|
0
|
33
|
173
|
34 @SET_MAKE@
|
|
35 SHELL=/bin/sh
|
|
36 RM = rm -f
|
|
37
|
163
|
38 lispdir = ${srcdir}/../lisp/
|
|
39 libsrc = ../lib-src/
|
|
40 etcdir = ../etc/
|
|
41
|
|
42 ## Here are the things that we expect ../configure to edit.
|
203
|
43 prefix=@prefix@
|
0
|
44 srcdir=@srcdir@
|
263
|
45 blddir=@blddir@
|
203
|
46 version=@version@
|
0
|
47 CC=@CC@
|
|
48 CPP=@CPP@
|
|
49 CFLAGS=@CFLAGS@
|
149
|
50 CPPFLAGS=@CPPFLAGS@
|
|
51 LDFLAGS=@LDFLAGS@
|
173
|
52 RECURSIVE_MAKE=@RECURSIVE_MAKE@
|
149
|
53
|
|
54 c_switch_all=@c_switch_all@
|
|
55 ld_switch_all=@ld_switch_all@
|
|
56 ld_libs_all=@ld_libs_all@
|
263
|
57 ld_dynamic_link_flags=@ld_dynamic_link_flags@
|
149
|
58
|
|
59 extra_objs=@extra_objs@
|
0
|
60 LN_S=@LN_S@
|
|
61
|
163
|
62 ld_switch_shared=@ld_switch_shared@
|
|
63 start_files=@start_files@
|
|
64 start_flags=@start_flags@
|
|
65 LD=@ld@
|
|
66 lib_gcc=@lib_gcc@
|
269
|
67 ##libmcheck=@libmcheck@
|
163
|
68
|
0
|
69 #define NOT_C_CODE
|
|
70 #include "config.h"
|
|
71
|
163
|
72 ## With the traditional VPATH setting, it is not possible to
|
|
73 ## simultaneously compile in-place and in another directory. The
|
|
74 ## mistaken definition is that *all* dependencies are searched for in
|
|
75 ## the VPATH directory, rather than just the dependencies that are not
|
|
76 ## themselves targets. Thus, if there is an up-to-date .o file in the
|
|
77 ## in-place location, it will not get recompiled in the not-in-place
|
|
78 ## location.
|
0
|
79
|
163
|
80 ## The GNU Make "vpath" directive continues this tradition, but at
|
|
81 ## least lets you restrict the classes of files that it applies to.
|
|
82 ## This allows us to kludge around the problem.
|
|
83
|
0
|
84 #ifdef USE_GNU_MAKE
|
|
85 vpath %.c @srcdir@
|
|
86 vpath %.h @srcdir@
|
163
|
87 ## now list files that should NOT be searched in the srcdir.
|
|
88 ## This includes any .c or .h built from something else
|
|
89 ## (e.g. a .in file).
|
0
|
90 vpath config.h
|
|
91 vpath paths.h
|
|
92 vpath Emacs.ad.h
|
183
|
93 vpath puresize-adjust.h
|
251
|
94 vpath sheap-adjust.h
|
0
|
95 #else
|
|
96 VPATH=@srcdir@
|
|
97 #endif
|
|
98
|
163
|
99 RM = rm -f
|
0
|
100
|
|
101 #ifdef HAVE_NATIVE_SOUND
|
149
|
102 sound_cflags=@sound_cflags@
|
0
|
103 #endif
|
|
104
|
163
|
105 LWLIB_SRCDIR = ${srcdir}/../lwlib
|
70
|
106
|
149
|
107 #ifdef HAVE_X_WINDOWS
|
163
|
108 lwlib_libs = ../lwlib/liblw.a
|
|
109 lwlib_deps = $(lwlib_libs)
|
|
110 $(lwlib_libs) :
|
173
|
111 cd ../lwlib && $(RECURSIVE_MAKE)
|
0
|
112
|
157
|
113 x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
|
267
|
114 glyphs-x.o objects-x.o redisplay-x.o xgccache.o xselect.o
|
70
|
115
|
149
|
116 #ifdef AIX4
|
|
117 LIBI18N = -li18n
|
|
118 #endif /* AIX4 */
|
70
|
119
|
272
|
120 X11_libs = $(LIBI18N)
|
149
|
121 #endif /* HAVE_X_WINDOWS */
|
0
|
122
|
251
|
123 #ifdef HEAP_IN_DATA
|
|
124 sheap_obj=sheap.o
|
|
125 #endif
|
|
126
|
163
|
127 ## -Demacs is needed to make some files produce the correct version
|
|
128 ## for use in Emacs.
|
0
|
129
|
157
|
130 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
|
163
|
131 cflags = $(CFLAGS) $(cppflags)
|
272
|
132 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
|
0
|
133
|
193
|
134 #ifdef SOLARIS2
|
|
135 %.o : %.c
|
|
136 #else
|
0
|
137 .c.o:
|
193
|
138 #endif
|
149
|
139 $(CC) -c $(cflags) $<
|
0
|
140
|
163
|
141 ## Create preprocessor output (debugging purposes only)
|
70
|
142 .c.i:
|
272
|
143 #ifdef __GNUC__
|
|
144 $(CC) -E $(cppflags) -o $@ $<
|
|
145 #else /* works on Solaris; what about other systems? */
|
149
|
146 $(CC) -P $(cppflags) $<
|
272
|
147 #endif /* compiler */
|
|
148
|
|
149 ## Create assembler output (debugging purposes only)
|
|
150 .c.s:
|
|
151 $(CC) -S -c $(cflags) $<
|
0
|
152
|
263
|
153 ## Create RTL files
|
|
154 %.c.rtl : %.c
|
|
155 $(CC) -dr -c $(cflags) $<
|
|
156
|
163
|
157 ## lastfile must follow all files whose initialized data areas should
|
|
158 ## be dumped as pure by dump-emacs.
|
0
|
159
|
163
|
160 ## NOTE: The last line cannot be all macros, because make will barf
|
|
161 ## if they all come out null.
|
0
|
162
|
157
|
163 objs=\
|
|
164 abbrev.o alloc.o blocktype.o buffer.o bytecode.o\
|
|
165 callint.o callproc.o casefiddle.o casetab.o chartab.o\
|
|
166 cmdloop.o cmds.o console.o console-stream.o\
|
|
167 data.o device.o dired.o doc.o doprnt.o dynarr.o\
|
|
168 editfns.o elhash.o emacs.o\
|
217
|
169 eval.o events.o $(extra_objs)\
|
163
|
170 event-stream.o extents.o faces.o\
|
173
|
171 fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\
|
278
|
172 frame.o general.o getloadavg.o glyphs.o glyphs-eimage.o\
|
267
|
173 $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
|
211
|
174 keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
|
157
|
175 macros.o marker.o md5.o minibuf.o objects.o opaque.o\
|
|
176 print.o process.o profile.o pure.o\
|
|
177 rangetab.o redisplay.o redisplay-output.o regex.o\
|
251
|
178 search.o $(sheap_obj) signal.o sound.o\
|
157
|
179 specifier.o strftime.o symbols.o syntax.o sysdep.o\
|
195
|
180 undo.o $(x_objs) widget.o window.o
|
0
|
181
|
263
|
182 obj_rtl = $(objs:.o=.c.rtl)
|
|
183
|
0
|
184 #ifdef REL_ALLOC
|
149
|
185 rallocdocsrc = ralloc.c
|
0
|
186 rallocobjs = ralloc.o
|
|
187 #endif
|
|
188
|
267
|
189 malloclib = $(libmcheck)
|
0
|
190 #ifndef SYSTEM_MALLOC
|
255
|
191 # ifdef GNU_MALLOC /* GNU malloc */
|
0
|
192 # ifdef ERROR_CHECK_MALLOC
|
255
|
193 #ifdef DOUG_LEA_MALLOC
|
|
194 mallocobjs = free-hook.o vm-limit.o
|
|
195 #else
|
0
|
196 mallocobjs = gmalloc.o free-hook.o vm-limit.o
|
255
|
197 #endif
|
0
|
198 mallocdocsrc = free-hook.c
|
149
|
199 # else /* New GNU malloc, sans error checking */
|
255
|
200 #ifdef DOUG_LEA_MALLOC
|
|
201 mallocobjs = vm-limit.o
|
|
202 #else
|
0
|
203 mallocobjs = gmalloc.o vm-limit.o
|
255
|
204 #endif
|
0
|
205 mallocdocsrc =
|
149
|
206 # endif /* ERROR_CHECK_MALLOC */
|
255
|
207 # else /* Older GNU malloc */
|
0
|
208 mallocobjs = malloc.o
|
|
209 mallocdocsrc =
|
255
|
210 # endif /* Older GNU malloc */
|
149
|
211 #else /* SYSTEM_MALLOC */
|
0
|
212 mallocobjs =
|
|
213 mallocdocsrc =
|
177
|
214 #ifdef USE_DEBUG_MALLOC
|
|
215 malloclib = -ldmalloc
|
|
216 #endif /* USE_DEBUG_MALLOC */
|
0
|
217 #endif /* SYSTEM_MALLOC */
|
|
218
|
|
219 #ifdef HAVE_X_WINDOWS
|
|
220
|
|
221 # ifdef EXTERNAL_WIDGET
|
149
|
222 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
0
|
223
|
163
|
224 ## Now we try to figure out how to link a shared library.
|
|
225 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
|
|
226 ## library will not be created.
|
0
|
227
|
|
228 # ifdef USE_GCC
|
|
229 # ifdef USG5
|
|
230 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
|
294
|
231 extw_link_beg = $(CC) -shared
|
|
232 extw_link_mid = -Xlinker -z -Xlinker text -o
|
|
233 extw_link_end =
|
163
|
234 ## I cannot figure out how to do shared a.out libraries, so just punt.
|
0
|
235 # elif !defined (LINUX) || defined (__ELF__)
|
|
236 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
|
294
|
237 extw_link_beg = $(CC) -shared
|
|
238 extw_link_mid = -o
|
|
239 extw_link_end =
|
0
|
240 # endif
|
|
241 # elif defined (USG5)
|
|
242 # if defined (IRIX)
|
|
243 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
|
294
|
244 extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations
|
|
245 extw_link_mid = -o
|
|
246 extw_link_end =
|
0
|
247 # else /* not IRIX */
|
|
248 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
|
294
|
249 extw_link_beg = $(CC) -G
|
|
250 extw_link_mid = -z text -o
|
|
251 extw_link_end =
|
0
|
252 # endif /* not IRIX */
|
|
253 # else /* not USG5 */
|
|
254 # if defined (DEC_ALPHA) && defined (OSF1)
|
163
|
255 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
|
294
|
256 extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
|
|
257 extw_link_mid = -o
|
|
258 extw_link_end = $(LIBES)
|
0
|
259 # else /* !(DEC_ALPHA && OSF1) */
|
|
260 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
|
294
|
261 extw_link_beg = $(LD) -dc
|
|
262 extw_link_mid = -assert pure-text -o
|
|
263 extw_link_end =
|
0
|
264 # endif /* !(DEC_ALPHA && OSF1) */
|
|
265 # endif /* not USG5 */
|
|
266
|
|
267 # ifdef LWLIB_USES_MOTIF
|
|
268 # ifdef EXTW_LINK
|
157
|
269 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
|
0
|
270 # else
|
157
|
271 motif_other_files = libextcli_Xm.a
|
0
|
272 # endif
|
223
|
273 #endif /* LWLIB_USES_MOTIF */
|
0
|
274
|
|
275 # ifdef EXTW_LINK
|
157
|
276 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
|
0
|
277 # endif
|
157
|
278 other_files=\
|
|
279 ${motif_other_files}\
|
|
280 libextcli_Xt.a libextcli_Xlib.a\
|
|
281 ${shared_other_files}
|
165
|
282
|
|
283 all: ${other_files}
|
149
|
284 # endif /* EXTERNAL_WIDGET */
|
0
|
285
|
274
|
286 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
|
|
287 dnd_objs = @dnd_objs@
|
|
288 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
|
|
289
|
|
290 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
|
149
|
291 #endif /* HAVE_X_WINDOWS */
|
0
|
292
|
163
|
293 ## define otherobjs as list of object files that make-docfile
|
|
294 ## should not be told about.
|
151
|
295 otherobjs = $(BTL_objs) lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
|
263
|
296 otherrtls = $(otherobjs:.o=.c.rtl)
|
|
297 othersrcs = $(otherobjs:.o=.c)
|
0
|
298
|
177
|
299 LIBES = $(lwlib_libs) $(quantify_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
|
0
|
300
|
|
301 #ifdef I18N3
|
149
|
302 mo_dir = ${etcdir}
|
|
303 mo_file = ${mo_dir}emacs.mo
|
0
|
304 #endif
|
|
305
|
267
|
306 LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir}:${blddir}"
|
0
|
307 DUMPENV = $(LOADPATH)
|
|
308
|
167
|
309 release: temacs ${libsrc}DOC $(mo_file) ${other_files}
|
0
|
310 #ifdef CANNOT_DUMP
|
280
|
311 ln temacs ${PROGNAME}
|
0
|
312 #else
|
|
313 #ifdef HAVE_SHM
|
|
314 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
315 w=`pwd`; cd ${srcdir} && $${w}/temacs -nl -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
316 else true; fi
|
104
|
317 @touch SATISFIED
|
267
|
318 -$(DUMPENV) ./temacs -nl -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
319 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
320 @$(RM) SATISFIED
|
0
|
321 #else /* ! defined (HAVE_SHM) */
|
|
322 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
323 w=`pwd`; cd ${srcdir} && $${w}/temacs -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
324 else true; fi
|
104
|
325 @touch SATISFIED
|
267
|
326 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
327 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
328 @$(RM) SATISFIED
|
0
|
329 #endif /* ! defined (HAVE_SHM) */
|
|
330 touch release
|
|
331 #endif /* ! defined (CANNOT_DUMP) */
|
|
332
|
280
|
333 ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
|
183
|
334 @$(RM) $@ && touch SATISFIED
|
267
|
335 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
193
|
336 @if test -f $@; then if test -f SATISFIED; then \
|
272
|
337 echo "Testing for Lisp shadows ..."; \
|
280
|
338 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
|
193
|
339 $(RM) SATISFIED; exit 0; fi; \
|
251
|
340 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
|
|
341 $(RECURSIVE_MAKE) $@;
|
173
|
342
|
267
|
343 fastdump: temacs
|
280
|
344 @$(RM) ${PROGNAME} && touch SATISFIED
|
269
|
345 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
280
|
346 @if test -f ${PROGNAME}; then if test -f SATISFIED; then \
|
|
347 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
|
267
|
348 $(RM) SATISFIED; exit 0; fi; \
|
|
349 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi;
|
|
350
|
183
|
351 FRC.update-elc.stamp :
|
|
352
|
215
|
353 update-elc.stamp : temacs FRC.update-elc.stamp
|
173
|
354 @touch NOBYTECOMPILE
|
267
|
355 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
183
|
356 @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
|
|
357 $(RM) NOBYTECOMPILE
|
0
|
358
|
|
359 obj_src = $(objs:.o=.c)
|
|
360
|
263
|
361 dortl : $(obj_rtl) $(otherrtls)
|
272
|
362 echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el
|
263
|
363 (for a in $(obj_src) $(othersrcs);do \
|
|
364 echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\
|
272
|
365 done)
|
263
|
366 echo "))" >> ${srcdir}/../lisp/source-files.el
|
|
367
|
70
|
368 #ifdef DYNODUMP
|
163
|
369 dynodump_deps = ../dynodump/dynodump.so
|
|
370 ../dynodump/dynodump.so:
|
173
|
371 cd ../dynodump && $(RECURSIVE_MAKE)
|
149
|
372 #endif /* DYNODUMP */
|
0
|
373
|
185
|
374 ${libsrc}DOC: temacs update-elc.stamp
|
169
|
375 $(RM) ${libsrc}DOC; \
|
267
|
376 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/make-docfile.el -- \
|
163
|
377 -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
|
|
378 ${obj_src} ${mallocdocsrc} ${rallocdocsrc}
|
0
|
379
|
|
380 dump_elcs: dump-elcs
|
|
381
|
|
382 dump-elcs: temacs
|
267
|
383 -${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
0
|
384
|
80
|
385 all-elc all-elcs:
|
173
|
386 cd .. && $(RECURSIVE_MAKE) all-elc
|
80
|
387
|
70
|
388 #ifdef I18N3
|
|
389
|
|
390 # if defined(SPARC) && !defined(USG)
|
|
391 xgettext= /usr/openwin/bin/xgettext
|
|
392 xgettext_args= -o emacs -m_X messages
|
|
393 msgfmt= /usr/openwin/bin/msgfmt
|
|
394 # else
|
|
395 xgettext= xgettext
|
|
396 xgettext_args= -s -d emacs -M_X messages
|
|
397 msgfmt= msgfmt
|
|
398 #endif
|
|
399
|
167
|
400 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs}
|
|
401 ${libsrc}make-msgfile -o ${libsrc}messages ${objs}
|
80
|
402 cd ${libsrc} && ${xgettext} ${xgettext_args}
|
163
|
403 $(RM) ${mo_dir}emacs.po
|
149
|
404 cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
|
70
|
405
|
149
|
406 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
|
|
407 cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
|
70
|
408
|
|
409 ${libsrc}make-msgfile:
|
173
|
410 cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
|
70
|
411
|
|
412 ${libsrc}make-po:
|
173
|
413 cd ${libsrc} && $(RECURSIVE_MAKE) make-po
|
70
|
414
|
|
415 #endif /* I18N3 */
|
|
416
|
0
|
417 ${libsrc}make-docfile:
|
173
|
418 cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
|
0
|
419
|
163
|
420 ## Lint Section
|
153
|
421 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
|
0
|
422 LINTFILES= $(objs:.o=.ln)
|
149
|
423 LINTINCLUDES = $(cppflags)
|
163
|
424 ## LINTFLAGS= -fd -m -p -s -u -v -x
|
2
|
425 LINTFLAGS= -fd -m -s -u -v -x
|
0
|
426 lint: $(LINTFILES)
|
|
427 $(LINT.c) $(LINTFILES)
|
163
|
428 ## end of Lint Section
|
0
|
429
|
157
|
430 temacs_deps=\
|
183
|
431 $(start_files) ${objs} ${otherobjs}\
|
255
|
432 $(lwlib_deps) $(dynodump_deps)
|
0
|
433
|
157
|
434 temacs_link_args=\
|
173
|
435 ${start_flags} ${ldflags}\
|
163
|
436 -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
|
0
|
437
|
149
|
438 temacs: $(temacs_deps)
|
183
|
439 $(LD) $(temacs_link_args)
|
|
440
|
|
441 .PHONY : run-temacs
|
|
442
|
219
|
443 run-temacs: temacs
|
284
|
444 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs
|
183
|
445
|
|
446 ## Debugging targets:
|
|
447 ##
|
|
448 ## RTC is Sun WorkShop's Run Time Checking
|
|
449 ##
|
|
450 ## Purify, Quantify, PureCoverage are software quality products from
|
|
451 ## Rational, formerly Pure Atria, formerly Pure Software.
|
272
|
452 ##
|
183
|
453 ## None of these products work with a dumped xemacs binary, because it
|
|
454 ## does unexpected things like free memory that has been malloc'ed in
|
|
455 ## a *different* process!! So we need to run these on temacs.
|
272
|
456 ##
|
183
|
457
|
|
458 .PHONY : run-rtcmacs run-puremacs run-quantmacs
|
0
|
459
|
78
|
460 rtc_patch.o:
|
|
461 rtc_patch_area -o $@
|
|
462
|
149
|
463 rtcmacs: $(temacs_deps) rtc_patch.o
|
173
|
464 $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o
|
78
|
465 mv temacs rtcmacs
|
|
466
|
183
|
467 run-rtcmacs: rtcmacs
|
78
|
468 dbx -q -C -c \
|
|
469 'dbxenv rtc_error_log_file_name /dev/fd/1; \
|
|
470 dbxenv suppress_startup_message 5.0; \
|
|
471 ignore POLL; \
|
|
472 check -access; \
|
|
473 suppress rui; \
|
267
|
474 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
|
78
|
475 run' rtcmacs
|
|
476
|
183
|
477 ## Purify
|
|
478 PURIFY_PROG=purify
|
|
479 PURIFY_FLAGS=-chain-length=32 -ignore-signals=SIGPOLL -threads=yes \
|
|
480 -cache-dir=./purecache -always-use-cache-dir=yes -pointer-mask=0x0fffffff
|
149
|
481 puremacs: $(temacs_deps)
|
181
|
482 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) -lpthread
|
|
483
|
|
484 run-puremacs: puremacs
|
284
|
485 -$(DUMPENV) ./puremacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs
|
0
|
486
|
183
|
487 ## Quantify
|
|
488 #ifdef QUANTIFY
|
|
489 quantify_prog = quantify
|
|
490 quantify_flags = -windows=no -record-data=no
|
|
491 quantify_includes = -I/local/include
|
|
492 quantify_libs = /local/lib/quantify_stubs.a
|
|
493
|
149
|
494 quantmacs: $(temacs_deps)
|
|
495 $(quantify_prog) $(quantify_flags) $(LD) $(temacs_link_args)
|
183
|
496 #endif /* QUANTIFY */
|
0
|
497
|
183
|
498 PURECOV_PROG=purecov
|
149
|
499 covmacs: $(temacs_deps)
|
|
500 $(PURECOV_PROG) $(LD) $(temacs_link_args)
|
0
|
501
|
183
|
502
|
223
|
503 TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
149
|
504 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
505 mv EmacsShell-sub.o TopLevelEmacsShell.o
|
|
506
|
263
|
507 TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
508 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
509 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
|
|
510
|
223
|
511 TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
149
|
512 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
513 mv EmacsShell-sub.o TransientEmacsShell.o
|
|
514
|
263
|
515 TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
516 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
517 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
|
|
518
|
163
|
519 ## Position-independent code for shared library creation
|
149
|
520 #if USE_GCC
|
|
521 pic_arg = -fpic
|
|
522 #elif defined (IRIX)
|
|
523 pic_arg = -KPIC
|
|
524 # else
|
|
525 pic_arg = -K pic
|
|
526 #endif
|
|
527
|
0
|
528 #ifdef EXTERNAL_WIDGET
|
|
529
|
157
|
530 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
531 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
532 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
|
|
533 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
534 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
535 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
|
0
|
536
|
163
|
537 ## Add dependencies so things work right with a parallel make
|
0
|
538 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
|
149
|
539 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
540 mv ExternalClient.o ExternalClient-Xm-shared.o
|
|
541
|
|
542 ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
543 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c
|
0
|
544 mv ExternalClient.o ExternalClient-Xt-shared.o
|
|
545
|
|
546 ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
|
149
|
547 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
548 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
|
|
549
|
|
550 ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
551 $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
552 mv ExternalClient.o ExternalClient-Xm-nonshared.o
|
|
553
|
|
554 ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c
|
149
|
555 $(CC) -c $(cflags) ${srcdir}/ExternalClient.c
|
0
|
556 mv ExternalClient.o ExternalClient-Xt-nonshared.o
|
|
557
|
|
558 ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c
|
149
|
559 $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
560 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
|
|
561
|
163
|
562 ## We compile the common files twice (once with PIC and once without)
|
|
563 ## because on some systems, compiling with PIC but not linking into
|
|
564 ## a shared library messes things up.
|
|
565
|
0
|
566 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
|
149
|
567 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
|
0
|
568 mv extw-Xt.o extw-Xt-shared.o
|
|
569
|
|
570 extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o
|
149
|
571 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
572 mv extw-Xlib.o extw-Xlib-shared.o
|
|
573
|
|
574 extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c
|
149
|
575 $(CC) -c $(cflags) ${srcdir}/extw-Xt.c
|
0
|
576 mv extw-Xt.o extw-Xt-nonshared.o
|
|
577
|
|
578 extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c
|
149
|
579 $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
580 mv extw-Xlib.o extw-Xlib-nonshared.o
|
|
581
|
157
|
582 libextcli_Xm.a: ${external_client_motif_objs_nonshared}
|
|
583 ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
|
0
|
584
|
157
|
585 libextcli_Xt.a: ${external_client_xt_objs_nonshared}
|
|
586 ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
|
0
|
587
|
157
|
588 libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
|
|
589 ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
|
0
|
590
|
|
591 #ifdef EXTW_LINK
|
|
592
|
157
|
593 libextcli_Xm.so.1: ${external_client_motif_objs_shared}
|
294
|
594 ${extw_link_beg} ${external_client_motif_objs_shared} ${extw_link_mid} libextcli_Xm.so.1 ${extw_link_end}
|
0
|
595
|
157
|
596 libextcli_Xt.so.1: ${external_client_xt_objs_shared}
|
294
|
597 ${extw_link_beg} ${external_client_xt_objs_shared} ${extw_link_mid} libextcli_Xt.so.1 ${extw_link_end}
|
0
|
598
|
157
|
599 libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
|
294
|
600 ${extw_link_beg} ${external_client_xlib_objs_shared} ${extw_link_mid} libextcli_Xlib.so.1 ${extw_link_end}
|
0
|
601
|
149
|
602 #endif /* EXTW_LINK */
|
0
|
603
|
|
604 #endif /* EXTERNAL_WIDGET */
|
|
605
|
|
606 config.h: ${srcdir}/config.h.in
|
183
|
607 puresize-adjust.h: ${srcdir}/puresize.h
|
163
|
608 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
|
0
|
609
|
251
|
610 config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h :
|
163
|
611 @echo "The file $@ needs to be re-generated."
|
|
612 @echo "Please run a make in the top level directory."
|
|
613 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
|
|
614 @exit 1
|
0
|
615
|
163
|
616 ## Some machines have alloca built-in.
|
|
617 ## They should define HAVE_ALLOCA, or may just let alloca.s
|
|
618 ## be used but generate no code.
|
|
619 ## Some have it written in assembler in alloca.s.
|
|
620 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
|
|
621
|
0
|
622
|
|
623 #ifdef C_ALLOCA
|
163
|
624 ## We could put something in alloca.c to #define free and malloc
|
|
625 ## whenever emacs was #defined, but that's not appropriate for all
|
|
626 ## users of alloca in Emacs. Check out ../lib-src/getopt.c. */
|
|
627
|
0
|
628 alloca.o : ${srcdir}/alloca.c
|
193
|
629 $(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) ${srcdir}/alloca.c
|
0
|
630 #else
|
|
631 #ifndef HAVE_ALLOCA
|
|
632 alloca.o : ${srcdir}/alloca.s config.h
|
163
|
633 ## $(CPP) is cc -E, which may get confused by filenames
|
|
634 ## that do not end in .c. So copy file to a safe name. */
|
|
635 ## cp ${srcdir}/alloca.s allocatem.c
|
|
636 ## Remove any ^L, blank lines, and preprocessor comments,
|
|
637 ## since some assemblers barf on them. Use a different basename for the
|
|
638 ## output file, since some stupid compilers (Green Hill) use that
|
|
639 ## name for the intermediate assembler file.
|
149
|
640 $(CPP) $(cppflags) allocatem.c | \
|
0
|
641 sed -e 's///' -e 's/^#.*//' | \
|
|
642 sed -n -e '/^..*$$/p' > allocax.s
|
163
|
643 @$(RM) alloca.o
|
|
644 ## Xenix, in particular, needs to run assembler via cc.
|
0
|
645 $(CC) -c allocax.s
|
|
646 mv allocax.o alloca.o
|
163
|
647 $(RM) allocax.s allocatem.c
|
0
|
648 #endif /* HAVE_ALLOCA */
|
|
649 #endif /* ! defined (C_ALLOCA) */
|
|
650
|
|
651 #ifdef EMACS_BTL
|
149
|
652 BTL_includes = -I$(BTL_dir)
|
|
653 BTL_compile = -DEMACS_BTL -D`lucid-arch` -I. $(BTL_includes) $(BTL_dir)/$(@:.o=.c)
|
0
|
654
|
|
655 cadillac-btl.o cadillac-btl-process.o cadillac-btl-emacs.o:
|
149
|
656 $(CC) $(CFLAGS) -c $(BTL_compile)
|
0
|
657 cadillac-btl-asm.o:
|
149
|
658 $(CC) $(CFLAGS) -c $(BTL_compile)
|
0
|
659 #endif /* EMACS_BTL */
|
|
660
|
|
661 #ifdef HAVE_NATIVE_SOUND
|
|
662 sunplay.o: ${srcdir}/sunplay.c
|
193
|
663 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
|
0
|
664 hpplay.o: ${srcdir}/hpplay.c
|
193
|
665 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
|
0
|
666 #endif /* HAVE_NATIVE_SOUND */
|
|
667
|
163
|
668 ## System-specific programs to be made.
|
|
669 ## ${other_files}, $(objects_system) and $(objects_machine)
|
|
670 ## select which of these should be compiled. */
|
|
671
|
171
|
672 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
|
0
|
673 mostlyclean:
|
272
|
674 $(RM) temacs puremacs quantmacs prefix-args *.o *.i \
|
259
|
675 core temacs.exe puresize-adjust.h sheap-adjust.h
|
171
|
676 clean: mostlyclean versionclean
|
183
|
677 $(RM) libextcli* update-elc.stamp
|
163
|
678 ## This is used in making a distribution.
|
|
679 ## Do not use it on development directories!
|
171
|
680 distclean: clean
|
276
|
681 $(RM) config.h paths.h Emacs.ad.h \
|
280
|
682 Makefile Makefile.in TAGS ${PROGNAME}.*
|
0
|
683 realclean: distclean
|
|
684 versionclean:
|
280
|
685 $(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC
|
0
|
686 extraclean: realclean
|
171
|
687 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
|
0
|
688
|
163
|
689 .PHONY : lock unlock
|
276
|
690 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
|
120
|
691 config.h.in README COPYING ChangeLog
|
0
|
692 unlock:
|
|
693 chmod u+w $(SOURCES)
|
|
694
|
|
695 relock:
|
|
696 chmod -w $(SOURCES)
|
|
697
|
272
|
698 ## Dependency processing using home-grown script, not makedepend
|
|
699 depend: FRC.depend
|
284
|
700 $(RM) ${srcdir}/depend depend.tmp
|
272
|
701 perl ${srcdir}/make-src-depend > depend.tmp
|
|
702 mv depend.tmp ${srcdir}/depend
|