• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Standard e2fsprogs prologue....
3#
4
5srcdir = @srcdir@
6top_srcdir = @top_srcdir@
7VPATH = @srcdir@
8top_builddir = ..
9my_dir = resize
10INSTALL = @INSTALL@
11
12@MCONFIG@
13
14PROGS=		resize2fs
15TEST_PROGS=	test_extent
16MANPAGES=	resize2fs.8
17
18RESIZE_OBJS= extent.o resize2fs.o main.o online.o resource_track.o \
19		sim_progress.o
20
21TEST_EXTENT_OBJS= extent.o test_extent.o
22
23SRCS= $(srcdir)/extent.c \
24	$(srcdir)/resize2fs.c \
25	$(srcdir)/main.c \
26	$(srcdir)/online.c \
27	$(srcdir)/resource_track.c \
28	$(srcdir)/sim_progress.c
29
30LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL) $(SYSLIBS)
31DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(DEPLIBCOM_ERR)
32
33STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
34	$(LIBINTL) $(SYSLIBS)
35DEPSTATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
36
37.c.o:
38	$(E) "	CC $<"
39	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
40	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
41	$(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
42
43all:: $(PROGS) $(TEST_PROGS) $(MANPAGES)
44
45resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
46	$(E) "	LD $@"
47	$(Q) $(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS)
48
49resize2fs.static: $(RESIZE_OBJS) $(DEPSTATIC_LIBS)
50	$(E) "	LD $@"
51	$(Q) $(LD) $(LDFLAGS_STATIC) -o resize2fs.static \
52		$(RESIZE_OBJS) $(STATIC_LIBS)
53
54resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
55	$(E) "	SUBST $@"
56	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/resize2fs.8.in resize2fs.8
57
58test_extent: $(TEST_EXTENT_OBJS)
59	$(E) "	LD $@"
60	$(Q) $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
61
62installdirs:
63	$(E) "	MKDIR_P $(root_sbindir) $(man8dir)"
64	$(Q) $(MKDIR_P) $(DESTDIR)$(root_sbindir) \
65		$(DESTDIR)$(man8dir)
66
67install: $(PROGS) $(MANPAGES) installdirs
68	$(Q) for i in $(PROGS); do \
69		echo "	INSTALL $(root_sbindir)/$$i"; \
70		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
71	done
72	$(Q) for i in $(MANPAGES); do \
73		for j in $(COMPRESS_EXT); do \
74			$(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
75		done; \
76		echo "	INSTALL_DATA $(man8dir)/$$i"; \
77		$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
78	done
79
80install-strip: install
81	$(Q) for i in $(PROGS); do \
82		echo "	STRIP $(root_sbindir)/$$i"; \
83		$(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
84	done
85
86uninstall:
87	for i in $(PROGS); do \
88		$(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
89	done
90	for i in $(MANPAGES); do \
91		$(RM) -f $(DESTDIR)$(man8dir)/$$i; \
92	done
93
94test_extent.out: test_extent $(srcdir)/test_extent.in
95	$(TESTENV) ./test_extent < $(srcdir)/test_extent.in > test_extent.out
96
97fullcheck check:: test_extent.out
98	$(Q) if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
99		echo "Test succeeded." ; \
100	else \
101		echo "Test failed!" ; \
102		diff test_extent.out $(srcdir)/test_extent.in ; \
103		exit 1 ; \
104	fi
105
106clean::
107	$(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \
108		resize2fs.static test_extent.out
109
110mostlyclean: clean
111
112distclean: clean
113	$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
114
115# +++ Dependency line eater +++
116#
117# Makefile dependencies follow.  This must be the last section in
118# the Makefile.in file
119#
120extent.o: $(srcdir)/extent.c $(top_builddir)/lib/config.h \
121 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
122 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
123 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
124 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
125 $(top_builddir)/lib/ext2fs/ext2_err.h \
126 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
127 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
128resize2fs.o: $(srcdir)/resize2fs.c $(top_builddir)/lib/config.h \
129 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
130 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
131 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
132 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
133 $(top_builddir)/lib/ext2fs/ext2_err.h \
134 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
135 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
136main.o: $(srcdir)/main.c $(top_builddir)/lib/config.h \
137 $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/e2p/e2p.h \
138 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
139 $(srcdir)/resize2fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
140 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
141 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
142 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
143 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/version.h
144online.o: $(srcdir)/online.c $(top_builddir)/lib/config.h \
145 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
146 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
147 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
148 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
149 $(top_builddir)/lib/ext2fs/ext2_err.h \
150 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
151 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
152resource_track.o: $(srcdir)/resource_track.c $(top_builddir)/lib/config.h \
153 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
154 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
155 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
156 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
157 $(top_builddir)/lib/ext2fs/ext2_err.h \
158 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
159 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
160sim_progress.o: $(srcdir)/sim_progress.c $(top_builddir)/lib/config.h \
161 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
162 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
163 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
164 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
165 $(top_builddir)/lib/ext2fs/ext2_err.h \
166 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
167 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
168