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