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.
5 ## Copyright (C) 1998, 1999 J. Kean Johnston.
7 ## This file is part of XEmacs.
9 ## XEmacs is free software; you can redistribute it and/or modify it
10 ## under the terms of the GNU General Public License as published by the
11 ## Free Software Foundation; either version 2, or (at your option) any
14 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT
15 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 ## You should have received a copy of the GNU General Public License
20 ## along with XEmacs; see the file COPYING. If not, write to
21 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ## Boston, MA 02111-1307, USA.
24 ## Synched up with: Not synched with FSF.
32 DUMP_TARGET = ${PROGNAME}.dmp
33 EXE_TARGET = ${PROGNAME}
36 DUMP_TARGET = ${PROGNAME}
42 .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
44 ## For performance and consistency, no built-in rules.
46 .SUFFIXES: .c .h .o .i .s .dep
49 RECURSIVE_MAKE=$(MAKE)
52 RECURSIVE_MAKE=@RECURSIVE_MAKE@
58 lispdir = ${srcdir}/../lisp/
59 moduledir = ${srcdir}/../modules/
63 ## Here are the things that we expect ../configure to edit.
74 c_switch_all=@c_switch_all@
75 ld_switch_all=@ld_switch_all@
76 ld_libs_all=@ld_libs_all@
77 ld_dynamic_link_flags=@ld_dynamic_link_flags@
79 extra_objs=@extra_objs@
82 ld_switch_shared=@ld_switch_shared@
83 start_files=@start_files@
84 start_flags=@start_flags@
87 ##libmcheck=@libmcheck@
90 ## With the traditional VPATH setting, it is not possible to
91 ## simultaneously compile in-place and in another directory. The
92 ## mistaken definition is that *all* dependencies are searched for in
93 ## the VPATH directory, rather than just the dependencies that are not
94 ## themselves targets. Thus, if there is an up-to-date .o file in the
95 ## in-place location, it will not get recompiled in the not-in-place
98 ## The GNU Make "vpath" directive continues this tradition, but at
99 ## least lets you restrict the classes of files that it applies to.
100 ## This allows us to kludge around the problem.
105 ## now list files that should NOT be searched in the srcdir.
106 ## This includes any .c or .h built from something else
107 ## (e.g. a .in file).
119 LWLIB_SRCDIR = ${srcdir}/../lwlib
121 #ifdef HAVE_X_WINDOWS
122 lwlib_libs = ../lwlib/liblw.a
123 lwlib_deps = $(lwlib_libs)
125 cd ../lwlib && $(RECURSIVE_MAKE)
127 x_objs=console-x.o device-x.o event-Xt.o frame-x.o\
128 glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o
134 X11_libs = $(LIBI18N)
135 #endif /* HAVE_X_WINDOWS */
137 #if defined (HEAP_IN_DATA) && !defined (PDUMP)
141 #if defined (WIN32_NATIVE) || defined (CYGWIN)
142 win32_objs=win32.o xemacs_res.o
145 ## -Demacs is needed to make some files produce the correct version
148 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
149 cflags = $(CFLAGS) $(cppflags)
150 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
157 $(CC) -c $(cflags) $<
159 ## Create preprocessor output (debugging purposes only)
162 $(CC) -E $(cppflags) -o $@ $<
163 #else /* works on Solaris; what about other systems? */
164 $(CC) -P $(cppflags) $<
165 #endif /* compiler */
167 ## Create assembler output (debugging purposes only)
169 $(CC) -S -c $(cflags) $<
173 $(CC) -dr -c $(cflags) $<
175 ## lastfile must follow all files whose initialized data areas should
176 ## be dumped as pure by dump-emacs.
178 ## NOTE: The last line cannot be all macros, because make will barf
179 ## if they all come out null.
182 abbrev.o alloc.o blocktype.o buffer.o bytecode.o\
183 callint.o callproc.o casefiddle.o casetab.o chartab.o\
184 cmdloop.o cmds.o console.o console-stream.o\
185 data.o device.o dired.o doc.o doprnt.o dynarr.o\
186 editfns.o elhash.o emacs.o\
187 eval.o events.o $(extra_objs)\
188 event-stream.o extents.o faces.o\
189 fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\
190 frame.o general.o glyphs.o glyphs-eimage.o glyphs-widget.o\
191 gui.o gutter.o $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
192 keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
193 macros.o marker.o md5.o minibuf.o objects.o opaque.o\
194 print.o process.o profile.o\
195 rangetab.o redisplay.o redisplay-output.o regex.o\
196 search.o select.o $(sheap_objs) signal.o sound.o\
197 specifier.o strftime.o symbols.o syntax.o sysdep.o\
198 undo.o $(x_objs) widget.o window.o $(win32_objs)
200 obj_rtl = $(objs:.o=.c.rtl)
203 rallocdocsrc = ralloc.c
204 rallocobjs = ralloc.o
207 malloclib = $(libmcheck)
208 #ifndef SYSTEM_MALLOC
209 # ifdef GNU_MALLOC /* GNU malloc */
210 # ifdef ERROR_CHECK_MALLOC
211 #ifdef DOUG_LEA_MALLOC
212 mallocobjs = free-hook.o vm-limit.o
214 mallocobjs = gmalloc.o free-hook.o vm-limit.o
216 mallocdocsrc = free-hook.c
217 # else /* New GNU malloc, sans error checking */
218 #ifdef DOUG_LEA_MALLOC
219 mallocobjs = vm-limit.o
221 mallocobjs = gmalloc.o vm-limit.o
224 # endif /* ERROR_CHECK_MALLOC */
225 # else /* Older GNU malloc */
226 mallocobjs = malloc.o
228 # endif /* Older GNU malloc */
229 #else /* SYSTEM_MALLOC */
232 #ifdef USE_DEBUG_MALLOC
233 malloclib = -ldmalloc
234 #endif /* USE_DEBUG_MALLOC */
235 #endif /* SYSTEM_MALLOC */
237 #ifdef HAVE_X_WINDOWS
239 # ifdef EXTERNAL_WIDGET
240 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
242 ## Now we try to figure out how to link a shared library.
243 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
244 ## library will not be created.
248 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
249 extw_link_beg = $(CC) -shared
250 extw_link_mid = -Xlinker -z -Xlinker text -o
252 ## I cannot figure out how to do shared a.out libraries, so just punt.
253 # elif !defined (LINUX) || defined (__ELF__)
254 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
255 extw_link_beg = $(CC) -shared
259 # elif defined (USG5)
261 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
262 extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations
265 # else /* not IRIX */
266 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
267 extw_link_beg = $(CC) -G
268 extw_link_mid = -z text -o
270 # endif /* not IRIX */
271 # else /* not USG5 */
272 # if defined (DEC_ALPHA) && defined (OSF1)
273 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
274 extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
276 extw_link_end = $(LIBES)
277 # else /* !(DEC_ALPHA && OSF1) */
278 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
279 extw_link_beg = $(LD) -dc
280 extw_link_mid = -assert pure-text -o
282 # endif /* !(DEC_ALPHA && OSF1) */
283 # endif /* not USG5 */
285 # ifdef LWLIB_USES_MOTIF
287 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
289 motif_other_files = libextcli_Xm.a
291 #endif /* LWLIB_USES_MOTIF */
294 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
297 ${motif_other_files}\
298 libextcli_Xt.a libextcli_Xlib.a\
299 ${shared_other_files}
302 # endif /* EXTERNAL_WIDGET */
304 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
305 dnd_objs = @dnd_objs@
306 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
308 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
309 #endif /* HAVE_X_WINDOWS */
311 ## define otherobjs as list of object files that make-docfile
312 ## should not be told about.
313 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
314 otherrtls = $(otherobjs:.o=.c.rtl)
315 othersrcs = $(otherobjs:.o=.c)
317 LIBES = $(lwlib_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
321 mo_file = ${mo_dir}emacs.mo
324 temacs_loadup = ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el
325 dump_temacs = ${temacs_loadup} dump
326 run_temacs = ${temacs_loadup} run-temacs
327 debug_temacs = gdb ${EXE_TARGET}
329 release: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files}
331 ln ${EXE_TARGET} ${PROGNAME}
333 -if [ -w ${srcdir}/../lisp ]; then \
334 w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/inc-vers; \
336 -./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el dump
338 #endif /* ! defined (CANNOT_DUMP) */
340 ${DUMP_TARGET}: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
342 @$(RM) $@ && touch SATISFIED
344 @if test -f $@; then if test -f SATISFIED; then \
345 echo "Testing for Lisp shadows ..."; \
346 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
347 $(RM) SATISFIED; exit 0; fi; \
348 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
350 $(RECURSIVE_MAKE) $@;
354 @echo "Testing for Lisp shadows ..."
355 @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
358 fastdump: ${EXE_TARGET}
359 @$(RM) ${DUMP_TARGET} && touch SATISFIED
361 @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
363 FRC.update-elc.stamp :
365 update-elc.stamp : ${EXE_TARGET} FRC.update-elc.stamp
367 ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el
368 @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
371 obj_src = $(objs:.o=.c)
373 dortl : $(obj_rtl) $(otherrtls)
374 echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el
375 (for a in $(obj_src) $(othersrcs);do \
376 echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\
378 echo "))" >> ${srcdir}/../lisp/source-files.el
381 dynodump_deps = ../dynodump/dynodump.so
382 ../dynodump/dynodump.so:
383 cd ../dynodump && $(RECURSIVE_MAKE)
384 #endif /* DYNODUMP */
386 ${libsrc}DOC: ${EXE_TARGET} update-elc.stamp
387 $(RM) ${libsrc}DOC; \
388 ${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/make-docfile.el -- \
389 -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
390 ${obj_src} ${mallocdocsrc} ${rallocdocsrc}
394 dump-elcs: ${EXE_TARGET}
395 -${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el
398 cd .. && $(RECURSIVE_MAKE) all-elc
402 # if defined(SPARC) && !defined(USG)
403 xgettext= /usr/openwin/bin/xgettext
404 xgettext_args= -o emacs -m_X messages
405 msgfmt= /usr/openwin/bin/msgfmt
408 xgettext_args= -s -d emacs -M_X messages
412 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs}
413 ${libsrc}make-msgfile -o ${libsrc}messages ${objs}
414 cd ${libsrc} && ${xgettext} ${xgettext_args}
415 $(RM) ${mo_dir}emacs.po
416 cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
418 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
419 cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
421 ${libsrc}make-msgfile:
422 cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
425 cd ${libsrc} && $(RECURSIVE_MAKE) make-po
429 ${libsrc}make-dump-id:
430 cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id
432 ${libsrc}make-docfile:
433 cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
436 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
437 LINTFILES= $(objs:.o=.ln)
438 LINTINCLUDES = $(cppflags)
439 ## LINTFLAGS= -fd -m -p -s -u -v -x
440 LINTFLAGS= -fd -m -s -u -v -x
442 $(LINT.c) $(LINTFILES)
443 ## end of Lint Section
446 $(start_files) ${objs} ${otherobjs}\
447 $(lwlib_deps) $(dynodump_deps)
450 $(link_deps) $(ID_FILE)
453 ${start_flags} ${ldflags} -I${srcdir} \
454 -o $@ ${start_files} ${objs} ${otherobjs} ${ID_FILE} ${LIBES}
456 ${EXE_TARGET}: $(temacs_deps)
457 $(LD) $(temacs_link_args)
459 dump-id.c: ${libsrc}make-dump-id ${link_deps}
460 ${libsrc}make-dump-id
464 run-temacs: ${EXE_TARGET}
467 ## We have automated tests!!
468 testdir = ${srcdir}/../tests/automated
469 batch_test_emacs = -batch -l ${testdir}/test-harness.el -f batch-test-emacs ${testdir}
471 .PHONY: check check-temacs
473 ./${PROGNAME} ${batch_test_emacs}
475 ${run_temacs} ${batch_test_emacs}
477 ## Debugging targets:
479 ## None of the debugging products work with a dumped xemacs binary,
480 ## because it does unexpected things like free memory that has been
481 ## malloc'ed in a *different* process!! So we need to run these on
484 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx
488 rtcmacs: $(temacs_deps) rtc_patch.o
489 $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o
490 mv ${EXE_TARGET} rtcmacs
495 'dbxenv rtc_error_log_file_name /dev/fd/1; \
496 dbxenv suppress_startup_message 5.0; \
500 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
503 debug-temacs: ${EXE_TARGET}
506 ## Purify, Quantify, PureCoverage are software quality products from
507 ## Rational, formerly Pure Atria, formerly Pure Software.
515 -chain-length=32 -ignore-signals=SIGPOLL -threads=yes\
516 -cache-dir=${srcdir}/purecache -always-use-cache-dir=yes
518 PURIFY_LIBS = -lpthread
519 puremacs: $(temacs_deps)
520 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
525 QUANTIFY_PROG = quantify
526 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir`
527 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes
528 cppflags += -I$(QUANTIFY_HOME)
529 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a
531 quantmacs: $(temacs_deps)
532 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
534 #endif /* QUANTIFY */
538 covmacs: $(temacs_deps)
539 $(PURECOV_PROG) $(LD) $(temacs_link_args)
542 TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
543 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
544 mv EmacsShell-sub.o TopLevelEmacsShell.o
546 TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
547 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
548 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
550 TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
551 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
552 mv EmacsShell-sub.o TransientEmacsShell.o
554 TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
555 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
556 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
558 ## The above rules are subject to a race condition if using a parallel make.
559 TransientEmacsShell.o : TopLevelEmacsShell.o
560 TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl
562 ## Position-independent code for shared library creation
571 #ifdef EXTERNAL_WIDGET
573 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
574 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
575 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
576 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
577 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
578 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
580 ## Add dependencies so things work right with a parallel make
581 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
582 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
583 mv ExternalClient.o ExternalClient-Xm-shared.o
585 ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
586 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c
587 mv ExternalClient.o ExternalClient-Xt-shared.o
589 ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
590 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c
591 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
593 ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
594 $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
595 mv ExternalClient.o ExternalClient-Xm-nonshared.o
597 ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c
598 $(CC) -c $(cflags) ${srcdir}/ExternalClient.c
599 mv ExternalClient.o ExternalClient-Xt-nonshared.o
601 ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c
602 $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
603 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
605 ## We compile the common files twice (once with PIC and once without)
606 ## because on some systems, compiling with PIC but not linking into
607 ## a shared library messes things up.
609 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
610 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
611 mv extw-Xt.o extw-Xt-shared.o
613 extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o
614 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c
615 mv extw-Xlib.o extw-Xlib-shared.o
617 extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c
618 $(CC) -c $(cflags) ${srcdir}/extw-Xt.c
619 mv extw-Xt.o extw-Xt-nonshared.o
621 extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c
622 $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
623 mv extw-Xlib.o extw-Xlib-nonshared.o
625 libextcli_Xm.a: ${external_client_motif_objs_nonshared}
626 ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
628 libextcli_Xt.a: ${external_client_xt_objs_nonshared}
629 ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
631 libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
632 ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
636 libextcli_Xm.so.1: ${external_client_motif_objs_shared}
637 ${extw_link_beg} ${external_client_motif_objs_shared} ${extw_link_mid} libextcli_Xm.so.1 ${extw_link_end}
639 libextcli_Xt.so.1: ${external_client_xt_objs_shared}
640 ${extw_link_beg} ${external_client_xt_objs_shared} ${extw_link_mid} libextcli_Xt.so.1 ${extw_link_end}
642 libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
643 ${extw_link_beg} ${external_client_xlib_objs_shared} ${extw_link_mid} libextcli_Xlib.so.1 ${extw_link_end}
645 #endif /* EXTW_LINK */
647 #endif /* EXTERNAL_WIDGET */
649 config.h: ${srcdir}/config.h.in
650 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
652 config.h sheap-adjust.h paths.h Emacs.ad.h :
653 @echo "The file $@ needs to be re-generated."
654 @echo "Please run a make in the top level directory."
655 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
658 ## Some machines have alloca built-in.
659 ## They should define HAVE_ALLOCA, or may just let alloca.s
660 ## be used but generate no code.
661 ## Some have it written in assembler in alloca.s.
662 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
666 ## We could put something in alloca.c to #define free and malloc
667 ## whenever emacs was #defined, but that's not appropriate for all
668 ## users of alloca in Emacs. Check out ../lib-src/getopt.c. */
670 alloca.o : ${srcdir}/alloca.c
671 $(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) ${srcdir}/alloca.c
674 alloca.o : ${srcdir}/alloca.s config.h
675 ## $(CPP) is cc -E, which may get confused by filenames
676 ## that do not end in .c. So copy file to a safe name. */
677 ## cp ${srcdir}/alloca.s allocatem.c
678 ## Remove any ^L, blank lines, and preprocessor comments,
679 ## since some assemblers barf on them. Use a different basename for the
680 ## output file, since some stupid compilers (Green Hill) use that
681 ## name for the intermediate assembler file.
682 $(CPP) $(cppflags) allocatem.c | \
683 sed -e 's/
\f//' -e 's/^#.*//' | \
684 sed -n -e '/^..*$$/p' > allocax.s
686 ## Xenix, in particular, needs to run assembler via cc.
688 mv allocax.o alloca.o
689 $(RM) allocax.s allocatem.c
690 #endif /* HAVE_ALLOCA */
691 #endif /* ! defined (C_ALLOCA) */
693 #ifdef HAVE_NATIVE_SOUND
694 sound_cflags=@sound_cflags@
695 sunplay.o: ${srcdir}/sunplay.c
696 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
697 hpplay.o: ${srcdir}/hpplay.c
698 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
699 #endif /* HAVE_NATIVE_SOUND */
701 xemacs_res.o: ${srcdir}/../nt/xemacs.rc
702 windres --include-dir ${srcdir}/../nt -i ${srcdir}/../nt/xemacs.rc -o $@
704 ## System-specific programs to be made.
705 ## ${other_files}, $(objects_system) and $(objects_machine)
706 ## select which of these should be compiled. */
708 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
710 $(RM) temacs puremacs quantmacs *.o *.i \
711 core temacs.exe sheap-adjust.h
712 clean: mostlyclean versionclean
713 $(RM) libextcli* update-elc.stamp
714 ## This is used in making a distribution.
715 ## Do not use it on development directories!
717 $(RM) config.h paths.h Emacs.ad.h \
718 GNUmakefile Makefile Makefile.in TAGS ${PROGNAME}.*
721 $(RM) ${EXE_TARGET} ${DUMP_TARGET} ${libsrc}DOC
722 extraclean: realclean
723 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
726 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
727 config.h.in README COPYING ChangeLog
734 ## Header files for ellcc
736 MAKEPATH=../lib-src/make-path
738 ${MAKEPATH} ${archlibdir}/include ${archlibdir}/include/m ${archlibdir}/include/s
739 -@echo "Copying include files for ellcc..."
741 cd ${srcdir}; hdrdir2=`pwd`; cd $$hdir; \
742 test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \
743 (for thisdir in $$hdir; do \
746 for hdrfile in *.h; do \
747 hdrtars="$$hdrtars $$hdrfile"; \
749 test -d s && hdrtars="$$hdrtars s/*"; \
750 test -d m && hdrtars="$$hdrtars m/*"; \
751 test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
752 (cd ${archlibdir}/include && umask 022 && tar xf -); \
753 chmod 755 ${archlibdir}/include; \
754 test -d ${archlibdir}/include/s && \
755 chmod 755 ${archlibdir}/include/s; \
756 test -d ${archlibdir}/include/m && \
757 chmod 755 ${archlibdir}/include/s;) \
761 ## Dependency processing using home-grown script, not makedepend
765 cd ${srcdir} && $(RM) depend.tmp && \
766 perl ./make-src-depend > depend.tmp && \
767 if cmp -s depend depend.tmp; \
768 then $(RM) depend.tmp; \
769 else $(RM) depend && mv depend.tmp depend; \