Commit | Line | Data |
---|---|---|
0cd1a8d2 JK |
1 | # Copyright (C) 1992 Free Software Foundation, Inc. |
2 | # This file is part of the GNU C Library. | |
3 | ||
4 | # The GNU C Library is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU Library General Public License as | |
6 | # published by the Free Software Foundation; either version 2 of the | |
7 | # License, or (at your option) any later version. | |
8 | ||
9 | # The GNU C Library is distributed in the hope that it will be useful, | |
63abb1e7 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
0cd1a8d2 JK |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | # Library General Public License for more details. | |
13 | ||
14 | # You should have received a copy of the GNU Library General Public | |
15 | # License along with the GNU C Library; see the file COPYING.LIB. If | |
16 | # not, write to the Free Software Foundation, Inc., 675 Mass Ave, | |
17 | # Cambridge, MA 02139, USA. | |
63abb1e7 FF |
18 | |
19 | # | |
20 | # Makefile for mmalloc directory | |
21 | # | |
22 | ||
23 | # Directory containing source files. Don't clean up the spacing, | |
24 | # this exact string is matched for by the "configure" script. | |
25 | srcdir = . | |
26 | ||
27 | prefix = /usr/local | |
28 | ||
0cd1a8d2 JK |
29 | exec_prefix = $(prefix) |
30 | ||
31 | bindir = $(exec_prefix)/bin | |
32 | libdir = $(exec_prefix)/lib | |
33 | ||
63abb1e7 | 34 | datadir = $(prefix)/lib |
0cd1a8d2 | 35 | mandir = $(prefix)/man |
63abb1e7 FF |
36 | man1dir = $(mandir)/man1 |
37 | man2dir = $(mandir)/man2 | |
38 | man3dir = $(mandir)/man3 | |
39 | man4dir = $(mandir)/man4 | |
40 | man5dir = $(mandir)/man5 | |
41 | man6dir = $(mandir)/man6 | |
42 | man7dir = $(mandir)/man7 | |
43 | man8dir = $(mandir)/man8 | |
44 | man9dir = $(mandir)/man9 | |
0cd1a8d2 | 45 | infodir = $(prefix)/info |
63abb1e7 FF |
46 | includedir = $(prefix)/include |
47 | docdir = $(datadir)/doc | |
48 | ||
49 | SHELL = /bin/sh | |
50 | ||
51 | INSTALL = install -c | |
52 | INSTALL_PROGRAM = $(INSTALL) | |
53 | INSTALL_DATA = $(INSTALL) | |
54 | ||
55 | AR = ar | |
56 | AR_FLAGS = qv | |
0cd1a8d2 | 57 | CFLAGS = -g |
63abb1e7 FF |
58 | BISON = bison |
59 | MAKEINFO = makeinfo | |
60 | RANLIB = ranlib | |
61 | RM = rm | |
62 | ||
63 | TARGETLIB = libmmalloc.a | |
64 | ||
63abb1e7 FF |
65 | CFILES = mcalloc.c mfree.c mmalloc.c mmcheck.c mmemalign.c mmstats.c \ |
66 | mmtrace.c mrealloc.c mvalloc.c mmap-sup.c attach.c detach.c \ | |
67 | keys.c sbrk-sup.c | |
68 | ||
69 | HFILES = mmalloc.h | |
70 | ||
71 | OFILES = mcalloc.o mfree.o mmalloc.o mmcheck.o mmemalign.o mmstats.o \ | |
72 | mmtrace.o mrealloc.o mvalloc.o mmap-sup.o attach.o detach.o \ | |
73 | keys.o sbrk-sup.o | |
74 | ||
75 | #### Host, target, and site specific Makefile fragments come in here. | |
76 | ### | |
77 | ||
0cd1a8d2 JK |
78 | .c.o: |
79 | $(CC) -c $(CFLAGS) -I. -I$(srcdir)/../include $(HDEFINES) $< | |
80 | ||
63abb1e7 FF |
81 | # Do we want/need any config overrides? |
82 | # | |
83 | ||
84 | STAGESTUFF = $(TARGETLIB) *.o | |
85 | ||
86 | all: $(TARGETLIB) | |
87 | ||
0cd1a8d2 JK |
88 | info: |
89 | clean-info: | |
90 | install-info: | |
91 | dvi: | |
92 | installcheck: | |
93 | check: | |
94 | ||
63abb1e7 FF |
95 | install: all |
96 | $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n | |
97 | $(RANLIB) $(libdir)/$(TARGETLIB).n | |
98 | mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB) | |
99 | ||
100 | $(TARGETLIB): $(OFILES) | |
101 | $(RM) -rf $@ | |
102 | $(AR) $(AR_FLAGS) $@ $(OFILES) | |
103 | $(RANLIB) $@ | |
104 | ||
105 | $(OFILES) : $(HFILES) | |
106 | ||
107 | .always.: | |
108 | # Do nothing. | |
109 | ||
110 | .PHONEY: all etags tags ls clean stage1 stage2 .always. | |
111 | ||
112 | stage1: force | |
113 | -mkdir stage1 | |
114 | -mv -f $(STAGESTUFF) stage1 | |
115 | ||
116 | stage2: force | |
117 | -mkdir stage2 | |
118 | -mv -f $(STAGESTUFF) stage2 | |
119 | ||
120 | stage3: force | |
121 | -mkdir stage3 | |
122 | -mv -f $(STAGESTUFF) stage3 | |
123 | ||
124 | stage4: force | |
125 | -mkdir stage4 | |
126 | -mv -f $(STAGESTUFF) stage4 | |
127 | ||
128 | against=stage2 | |
129 | ||
130 | comparison: force | |
131 | for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done | |
132 | ||
133 | de-stage1: force | |
134 | -(cd stage1 ; mv -f * ..) | |
135 | -rmdir stage1 | |
136 | ||
137 | de-stage2: force | |
138 | -(cd stage2 ; mv -f * ..) | |
139 | -rmdir stage2 | |
140 | ||
141 | de-stage3: force | |
142 | -(cd stage3 ; mv -f * ..) | |
143 | -rmdir stage3 | |
144 | ||
145 | de-stage4: force | |
146 | -(cd stage4 ; mv -f * ..) | |
147 | -rmdir stage4 | |
148 | ||
149 | etags tags: TAGS | |
150 | ||
151 | TAGS: $(CFILES) | |
0cd1a8d2 | 152 | etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done` |
63abb1e7 FF |
153 | |
154 | ls: | |
155 | @echo Makefile $(HFILES) $(CFILES) | |
156 | ||
157 | # Need to deal with profiled libraries, too. | |
158 | ||
0cd1a8d2 | 159 | mostlyclean clean: |
63abb1e7 FF |
160 | rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors |
161 | ||
0cd1a8d2 JK |
162 | distclean realclean: clean |
163 | rm -f config.status | |
164 | rm -f Makefile depend | |
165 | ||
63abb1e7 FF |
166 | force: |
167 | ||
168 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) \ | |
169 | $(target_makefile_frag) | |
170 | $(SHELL) ./config.status |