]>
Commit | Line | Data |
---|---|---|
24b2c7a7 TT |
1 | # |
2 | # Standard e2fsprogs prologue.... | |
3 | # | |
4 | ||
5 | srcdir = @srcdir@ | |
6 | top_srcdir = @top_srcdir@ | |
7 | VPATH = @srcdir@ | |
8 | top_builddir = .. | |
9 | my_dir = resize | |
10 | INSTALL = @INSTALL@ | |
11 | ||
12 | @MCONFIG@ | |
13 | ||
14 | PROGS= resize2fs | |
c762c8e6 | 15 | TEST_PROGS= test_extent |
24b2c7a7 TT |
16 | MANPAGES= resize2fs.8 |
17 | ||
1eb31c48 TT |
18 | RESIZE_OBJS= extent.o resize2fs.o main.o online.o resource_track.o \ |
19 | sim_progress.o | |
24b2c7a7 | 20 | |
c762c8e6 TT |
21 | TEST_EXTENT_OBJS= extent.o test_extent.o |
22 | ||
23 | SRCS= $(srcdir)/extent.c \ | |
052db4b7 | 24 | $(srcdir)/resize2fs.c \ |
c762c8e6 | 25 | $(srcdir)/main.c \ |
bf69235a | 26 | $(srcdir)/online.c \ |
1eb31c48 | 27 | $(srcdir)/resource_track.c \ |
c762c8e6 | 28 | $(srcdir)/sim_progress.c |
24b2c7a7 | 29 | |
6c59a665 | 30 | LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL) $(SYSLIBS) |
a6a1c081 | 31 | DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(DEPLIBCOM_ERR) |
24b2c7a7 | 32 | |
55f4cbd9 | 33 | STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \ |
6c59a665 | 34 | $(LIBINTL) $(SYSLIBS) |
a6a1c081 | 35 | DEPSTATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) |
0e14f78e | 36 | |
24b2c7a7 | 37 | .c.o: |
c13351f6 TT |
38 | $(E) " CC $<" |
39 | $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@ | |
832cb612 | 40 | $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $< |
a46300fe | 41 | $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $< |
24b2c7a7 | 42 | |
0cee8a5c | 43 | all:: $(PROGS) $(TEST_PROGS) $(MANPAGES) |
24b2c7a7 TT |
44 | |
45 | resize2fs: $(RESIZE_OBJS) $(DEPLIBS) | |
c13351f6 TT |
46 | $(E) " LD $@" |
47 | $(Q) $(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS) | |
24b2c7a7 | 48 | |
a6a1c081 | 49 | resize2fs.static: $(RESIZE_OBJS) $(DEPSTATIC_LIBS) |
c13351f6 | 50 | $(E) " LD $@" |
fd1677e8 | 51 | $(Q) $(LD) $(LDFLAGS_STATIC) -o resize2fs.static \ |
0e14f78e TT |
52 | $(RESIZE_OBJS) $(STATIC_LIBS) |
53 | ||
44339bdf | 54 | resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in |
c13351f6 TT |
55 | $(E) " SUBST $@" |
56 | $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/resize2fs.8.in resize2fs.8 | |
24b2c7a7 | 57 | |
c762c8e6 | 58 | test_extent: $(TEST_EXTENT_OBJS) |
c13351f6 TT |
59 | $(E) " LD $@" |
60 | $(Q) $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS) | |
dd607056 | 61 | |
24b2c7a7 | 62 | installdirs: |
5abc0414 RB |
63 | $(E) " MKDIR_P $(root_sbindir) $(man8dir)" |
64 | $(Q) $(MKDIR_P) $(DESTDIR)$(root_sbindir) \ | |
d171c5b5 | 65 | $(DESTDIR)$(man8dir) |
24b2c7a7 TT |
66 | |
67 | install: $(PROGS) $(MANPAGES) installdirs | |
c13351f6 | 68 | $(Q) for i in $(PROGS); do \ |
522798d3 | 69 | echo " INSTALL $(root_sbindir)/$$i"; \ |
e4c8e885 | 70 | $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \ |
24b2c7a7 | 71 | done |
c13351f6 | 72 | $(Q) for i in $(MANPAGES); do \ |
482afc44 TT |
73 | for j in $(COMPRESS_EXT); do \ |
74 | $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \ | |
75 | done; \ | |
522798d3 | 76 | echo " INSTALL_DATA $(man8dir)/$$i"; \ |
24b2c7a7 TT |
77 | $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \ |
78 | done | |
79 | ||
522798d3 | 80 | install-strip: install |
c13351f6 | 81 | $(Q) for i in $(PROGS); do \ |
522798d3 TT |
82 | echo " STRIP $(root_sbindir)/$$i"; \ |
83 | $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \ | |
84 | done | |
85 | ||
24b2c7a7 TT |
86 | uninstall: |
87 | for i in $(PROGS); do \ | |
e4c8e885 | 88 | $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \ |
24b2c7a7 TT |
89 | done |
90 | for i in $(MANPAGES); do \ | |
d171c5b5 | 91 | $(RM) -f $(DESTDIR)$(man8dir)/$$i; \ |
24b2c7a7 TT |
92 | done |
93 | ||
c762c8e6 | 94 | test_extent.out: test_extent $(srcdir)/test_extent.in |
60abcd73 | 95 | $(TESTENV) ./test_extent < $(srcdir)/test_extent.in > test_extent.out |
c762c8e6 | 96 | |
11b8ef8b | 97 | fullcheck check:: test_extent.out |
c13351f6 | 98 | $(Q) if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \ |
c762c8e6 TT |
99 | echo "Test succeeded." ; \ |
100 | else \ | |
101 | echo "Test failed!" ; \ | |
102 | diff test_extent.out $(srcdir)/test_extent.in ; \ | |
103 | exit 1 ; \ | |
104 | fi | |
dd607056 | 105 | |
fedfb27f | 106 | clean:: |
c762c8e6 | 107 | $(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \ |
790a0ad4 | 108 | resize2fs.static test_extent.out |
24b2c7a7 TT |
109 | |
110 | mostlyclean: clean | |
5c36a2f8 | 111 | |
24b2c7a7 | 112 | distclean: clean |
5c36a2f8 | 113 | $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old |
24b2c7a7 TT |
114 | |
115 | # +++ Dependency line eater +++ | |
116 | # | |
117 | # Makefile dependencies follow. This must be the last section in | |
118 | # the Makefile.in file | |
119 | # | |
1eb31c48 TT |
120 | extent.o: $(srcdir)/extent.c $(top_builddir)/lib/config.h \ |
121 | $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \ | |
797f5ef1 | 122 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 123 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 124 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 | 125 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
574b714d TT |
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 | |
1eb31c48 TT |
128 | resize2fs.o: $(srcdir)/resize2fs.c $(top_builddir)/lib/config.h \ |
129 | $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \ | |
797f5ef1 | 130 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 131 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 132 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 | 133 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
574b714d TT |
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 | |
1eb31c48 TT |
136 | main.o: $(srcdir)/main.c $(top_builddir)/lib/config.h \ |
137 | $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/e2p/e2p.h \ | |
797f5ef1 | 138 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
75e93ab0 | 139 | $(srcdir)/resize2fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ |
e1f08507 TT |
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 \ | |
574b714d TT |
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 | |
1eb31c48 TT |
144 | online.o: $(srcdir)/online.c $(top_builddir)/lib/config.h \ |
145 | $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \ | |
bf69235a | 146 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 147 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
bf69235a | 148 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 | 149 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
574b714d TT |
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 | |
1eb31c48 TT |
152 | resource_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 \ | |
574b714d TT |
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 | |
1eb31c48 TT |
160 | sim_progress.o: $(srcdir)/sim_progress.c $(top_builddir)/lib/config.h \ |
161 | $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \ | |
797f5ef1 | 162 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 163 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 164 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 | 165 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
574b714d TT |
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 |