aboutsummaryrefslogtreecommitdiff
path: root/e2fsck/Makefile.in
blob: 8f12cb65dfcf9e6e36e7119e6a81b53fd593d6ba (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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#
# Makefile for e2fsck
#

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
top_builddir = ..
my_dir = e2fsck
INSTALL = @INSTALL@
LDFLAG_STATIC = @LDFLAG_STATIC@

@MCONFIG@

PROGS=		e2fsck
MANPAGES=	e2fsck.8
XTRA_CFLAGS=	-DRESOURCE_TRACK

LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID)
DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID)

STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID)
STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID)

PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID)
PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID)

.c.o:
	$(CC) -c $(ALL_CFLAGS) $< -o $@
@PROFILE_CMT@	$(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<

#
# Flags for using Checker
#	Note: The optimization flags must include -g
#
#MCHECK=	-checker
#LIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) $(CHECKLIB)
#DEPLIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) 
#CHECKLIB= /usr/lib/libchecker.o

#
# Flags for doing mtrace --- uncomment to produce mtracing e2fsck
# 	Note:  The optimization flags must include -g
#
#MTRACE=	-DMTRACE
#MTRACE_OBJ= mtrace.o
#MTRACE_SRC= $(srcdir)/mtrace.c
#OPT= -g

#
# Flags for doing mcheck --- uncomment to produce mchecking e2fsck
# 	Note:  The optimization flags must include -g
#
#MCHECK= -DMCHECK

OBJS= unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o pass3.o pass4.o \
	pass5.o swapfs.o badblocks.o util.o dirinfo.o ehandler.o \
	problem.o message.o $(MTRACE_OBJ)

PROFILED_OBJS= profiled/unix.o profiled/e2fsck.o profiled/super.o \
	profiled/pass1.o profiled/pass1b.o \
	profiled/pass2.o profiled/pass3.o profiled/pass4.o profiled/pass5.o \
	profiled/badblocks.o profiled/util.o profiled/dirinfo.o \
	profiled/ehandler.o profiled/message.o profiled/problem.o \
	profiled/swapfs.o

SRCS= $(srcdir)/e2fsck.c \
	$(srcdir)/super.c \
	$(srcdir)/pass1.c \
	$(srcdir)/pass1b.c \
	$(srcdir)/pass2.c \
	$(srcdir)/pass3.c \
	$(srcdir)/pass4.c \
	$(srcdir)/pass5.c \
	$(srcdir)/badblocks.c \
	$(srcdir)/util.c \
	$(srcdir)/unix.c \
	$(srcdir)/dirinfo.c \
	$(srcdir)/ehandler.c \
	$(srcdir)/problem.c \
	$(MTRACE_SRC)

all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES)

@PROFILE_CMT@all:: e2fsck.profiled

e2fsck: e2fsck.@E2FSCK_TYPE@
	$(CP) e2fsck.@E2FSCK_TYPE@ e2fsck

e2fsck.static: $(OBJS)  $(STATIC_DEPLIBS)
	$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
		$(STATIC_LIBS) 

e2fsck.shared: $(OBJS)  $(DEPLIBS)
	$(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS) 

e2fsck.profiled: $(PROFILED_OBJS)  $(PROFILED_DEPLIBS)
	$(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
		$(PROFILED_LIBS) 

extend: extend.o
	$(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)

flushb: flushb.o
	$(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)

iscan: iscan.o util.o
	$(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)

profiled:
	mkdir profiled

e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
	$(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8

installdirs:
	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir) \
		$(DESTDIR)$(cat8dir)

install: $(PROGS) $(MANPAGES) installdirs
	for i in $(PROGS); do \
		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
		$(STRIP) $(DESTDIR)$(sbindir)/$$i; \
	done
	$(LN) -f $(DESTDIR)$(sbindir)/e2fsck $(DESTDIR)$(sbindir)/fsck.ext2
	for i in $(MANPAGES); do \
		$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
	done

uninstall:
	for i in $(PROGS); do \
		$(RM) -f $(sbindir)/$$i; \
	done
	$(RM) -f $(sbindir)/fsck.ext2
	for i in $(MANPAGES); do \
		$(RM) -f $(man8dir)/$$i; \
	done

clean:
	$(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
		e2fsck.shared e2fsck.profiled e2fsck.8
	$(RM) -rf profiled

mostlyclean: clean
distclean: clean
	$(RM) -f .depend Makefile

# +++ Dependency line eater +++
# 
# Makefile dependencies follow.  This must be the last section in
# the Makefile.in file
#
e2fsck.o: $(srcdir)/e2fsck.c $(top_srcdir)/lib/et/com_err.h \
 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
super.o: $(srcdir)/super.c $(top_srcdir)/lib/uuid/uuid.h $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h \
 $(srcdir)/../version.h
pass1.o: $(srcdir)/pass1.c $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h \
 $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
pass1b.o: $(srcdir)/pass1b.c $(top_srcdir)/lib/et/com_err.h \
 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
pass2.o: $(srcdir)/pass2.c $(srcdir)/e2fsck.h  \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
pass3.o: $(srcdir)/pass3.c $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
pass4.o: $(srcdir)/pass4.c $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
pass5.o: $(srcdir)/pass5.c $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h
util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h  
unix.o: $(srcdir)/unix.c $(top_srcdir)/lib/et/com_err.h \
 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h \
 $(srcdir)/../version.h
dirinfo.o: $(srcdir)/dirinfo.c $(top_srcdir)/lib/et/com_err.h \
 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h
ehandler.o: $(srcdir)/ehandler.c $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h  
problem.o: $(srcdir)/problem.c $(srcdir)/e2fsck.h \
 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h