0
|
1 /* Hey Emacs, this is a -*- Makefile -*- */
|
|
2
|
|
3 /* Makefile for dynodump subdirectory in XEmacs
|
|
4 Copyright (C) 1995 Board of Trustees, University of Illinois
|
|
5
|
|
6 This file is part of XEmacs.
|
|
7
|
|
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.
|
|
12
|
|
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.
|
|
17
|
|
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 the Free
|
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
21
|
|
22 /* Avoid trouble on systems where the "SHELL" variable might be
|
|
23 inherited from the environment. */
|
|
24 SHELL = /bin/sh
|
|
25
|
|
26 /* Some people use these in paths they define. We do not want their paths
|
|
27 getting changed on them. */
|
|
28 #undef sparc
|
|
29 #undef sun
|
|
30 #undef unix
|
|
31 #undef i386
|
|
32 #undef ppc
|
|
33 #undef sgi
|
|
34
|
|
35 /* ==================== Things "configure" will edit ==================== */
|
|
36
|
|
37 CC=@CC@
|
|
38 CFLAGS=@CFLAGS@
|
|
39 ARCH=@dynodump_arch@
|
|
40
|
|
41 /* Where to find the source code. This is set by the configure
|
|
42 "--srcdir" option. However, the value of ${srcdir} in
|
|
43 this makefile is not identical to what was specified with --srcdir,
|
|
44 since the variable here has "/dynodump" added at the end. */
|
|
45 srcdir=@srcdir@
|
|
46
|
|
47 /* ========================= start of cpp stuff ========================= */
|
|
48
|
|
49 #define NO_SHORTNAMES
|
|
50 #define THIS_IS_YMAKEFILE
|
|
51 #define NOT_C_CODE
|
|
52 #include "../src/config.h"
|
|
53
|
|
54 /* With the traditional VPATH setting, it is not possible to
|
|
55 simultaneously compile in-place and in another directory. The
|
|
56 mistaken definition is that *all* dependencies are searched for in
|
|
57 the VPATH directory, rather than just the dependencies that are not
|
|
58 themselves targets. Thus, if there is an up-to-date .o file in the
|
|
59 in-place location, it will not get recompiled in the not-in-place
|
|
60 location.
|
|
61
|
|
62 The GNU Make "vpath" directive continues this tradition, but at
|
|
63 least lets you to restrict the classes of files that it applies to.
|
|
64 This allows us to kludge around the problem. */
|
|
65 #ifdef USE_GNU_MAKE
|
|
66 vpath %.c @srcdir@
|
|
67 vpath %.h @srcdir@
|
|
68 /* now list files that should NOT be searched in the srcdir.
|
|
69 This includes any .c or .h that is built from something else
|
|
70 (e.g. a .in file). */
|
|
71 /* none here */
|
|
72 #else
|
|
73 VPATH=@srcdir@
|
|
74 #endif
|
|
75
|
|
76 #ifdef USE_GCC
|
|
77 # define PIC_ARG -fpic
|
|
78 #else
|
|
79 # define PIC_ARG -K pic
|
|
80 #endif
|
|
81
|
|
82 INCLUDES = -I${srcdir} -I${srcdir}/$(ARCH)
|
|
83 ALL_CFLAGS = ${CFLAGS} PIC_ARG ${INCLUDES}
|
|
84 OBJS = _relocate.o dynodump.o syms.o uninit.o
|
|
85
|
|
86 .c.o:
|
|
87 $(CC) -c $(ALL_CFLAGS) $<
|
|
88
|
|
89 /* If we do not need dynodump, then do nothing. */
|
|
90 #ifdef DYNODUMP
|
|
91 all:: dynodump.so
|
|
92 #else
|
|
93 all::
|
|
94 #endif
|
|
95
|
|
96 dynodump.so: ${srcdir}/_dynodump.h $(OBJS)
|
10
|
97 PATH=/usr/ccs/bin:$PATH ld -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
|
0
|
98
|
|
99 _relocate.o: ${srcdir}/$(ARCH)/_relocate.c
|
|
100 $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c
|
|
101
|
|
102 uninit.o: ${srcdir}/$(ARCH)/uninit.c
|
|
103 $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/uninit.c
|
|
104
|
|
105 mostlyclean:
|
|
106 -rm -f *.o \#*
|
|
107
|
|
108 clean: mostlyclean
|
|
109 -rm -f *.so *.so.1
|
|
110
|
|
111 distclean: clean
|
|
112 -rm -f Makefile Makefile.in
|
|
113
|
|
114 realclean: distclean
|
|
115 rm -f TAGS
|
|
116
|
|
117 versionclean:
|
|
118 true
|
|
119
|
|
120 extraclean: realclean
|
|
121 -rm -f *~ \#*
|