aboutsummaryrefslogtreecommitdiff
path: root/mmalloc/Makefile.in
blob: 57dfcefa1e0157ae4a2869d546f36b5755bf693b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#
# Makefile
#   Copyright (C) 1992 Cygnus Support
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
#

#
# Makefile for mmalloc directory
#

# Directory containing source files.  Don't clean up the spacing,
# this exact string is matched for by the "configure" script.
srcdir = .

prefix =	/usr/local

bindir =	$(prefix)/bin
datadir =	$(prefix)/lib
libdir =	$(prefix)/lib
mandir =	$(datadir)/man
man1dir =	$(mandir)/man1
man2dir =	$(mandir)/man2
man3dir =	$(mandir)/man3
man4dir =	$(mandir)/man4
man5dir =	$(mandir)/man5
man6dir =	$(mandir)/man6
man7dir =	$(mandir)/man7
man8dir =	$(mandir)/man8
man9dir =	$(mandir)/man9
infodir =	$(datadir)/info
includedir =	$(prefix)/include
docdir =	$(datadir)/doc

SHELL =		/bin/sh

INSTALL =	install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA =	$(INSTALL)

AR =		ar
AR_FLAGS =	qv
BISON =		bison
MAKEINFO =	makeinfo
RANLIB =	ranlib
RM =		rm

TARGETLIB =	libmmalloc.a

MINUS_G =	-g
CFLAGS =	$(MINUS_G) -I. -I$(srcdir)/../include $(HDEFINES)

CFILES =	mcalloc.c mfree.c mmalloc.c mmcheck.c mmemalign.c mmstats.c \
		mmtrace.c mrealloc.c mvalloc.c mmap-sup.c attach.c detach.c \
		keys.c sbrk-sup.c

HFILES =	mmalloc.h

OFILES =	mcalloc.o mfree.o mmalloc.o mmcheck.o mmemalign.o mmstats.o \
		mmtrace.o mrealloc.o mvalloc.o mmap-sup.o attach.o detach.o \
		keys.o sbrk-sup.o

#### Host, target, and site specific Makefile fragments come in here.
###

# Do we want/need any config overrides?
#	 

STAGESTUFF =	$(TARGETLIB) *.o

all:		$(TARGETLIB)

install:	all
		$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
		$(RANLIB) $(libdir)/$(TARGETLIB).n
		mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)

$(TARGETLIB):	$(OFILES)
		$(RM) -rf $@
		$(AR) $(AR_FLAGS) $@ $(OFILES)
		$(RANLIB) $@

$(OFILES) :	$(HFILES)

.always.:
# Do nothing.

.PHONEY: all etags tags ls clean stage1 stage2 .always.

stage1:		force
		-mkdir stage1
		-mv -f $(STAGESTUFF) stage1

stage2:		force
		-mkdir stage2
		-mv -f $(STAGESTUFF) stage2

stage3:		force
		-mkdir stage3
		-mv -f $(STAGESTUFF) stage3

stage4:		force
		-mkdir stage4
		-mv -f $(STAGESTUFF) stage4

against=stage2

comparison:	force
		for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done

de-stage1:	force
		-(cd stage1 ; mv -f * ..)
		-rmdir stage1

de-stage2:	force
		-(cd stage2 ; mv -f * ..)
		-rmdir stage2

de-stage3:	force
		-(cd stage3 ; mv -f * ..)
		-rmdir stage3

de-stage4:	force
		-(cd stage4 ; mv -f * ..)
		-rmdir stage4

etags tags:	TAGS

TAGS:		$(CFILES)
		etags $(HFILES) $(CFILES)

ls:
		@echo Makefile $(HFILES) $(CFILES)

# Need to deal with profiled libraries, too.

clean:
		rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors 

force:

Makefile:	$(srcdir)/Makefile.in $(host_makefile_frag) \
		$(target_makefile_frag)
		$(SHELL) ./config.status