]>
Commit | Line | Data |
---|---|---|
50e1e10f TT |
1 | # Makefile for the second extended file system utility functions |
2 | # | |
3 | # Copyright (C) 1993 Remy Card (card@masi.ibp.fr) | |
4 | # | |
5 | # This file can be redistributed under the terms of the GNU General | |
6 | # Public License | |
7 | ||
8 | srcdir = @srcdir@ | |
9 | top_srcdir = @top_srcdir@ | |
10 | VPATH = @srcdir@ | |
11 | top_builddir = ../.. | |
1e3472c5 | 12 | my_dir = lib/e2p |
50e1e10f TT |
13 | INSTALL = @INSTALL@ |
14 | ||
15 | @MCONFIG@ | |
16 | ||
e6441865 | 17 | all:: e2p.pc |
50e1e10f | 18 | |
d7b701de | 19 | OBJS= feature.o fgetflags.o fsetflags.o fgetversion.o fsetversion.o \ |
03a179a1 | 20 | getflags.o getversion.o hashstr.o iod.o ls.o ljs.o mntopts.o \ |
63253946 | 21 | parse_num.o pe.o pf.o ps.o setflags.o setversion.o uuid.o \ |
3627e838 | 22 | ostype.o percent.o crypto_mode.o fgetproject.o fsetproject.o |
50e1e10f | 23 | |
d7b701de TT |
24 | SRCS= $(srcdir)/feature.c $(srcdir)/fgetflags.c \ |
25 | $(srcdir)/fsetflags.c $(srcdir)/fgetversion.c \ | |
26 | $(srcdir)/fsetversion.c $(srcdir)/getflags.c \ | |
f606dd32 | 27 | $(srcdir)/getversion.c $(srcdir)/hashstr.c $(srcdir)/iod.c \ |
03a179a1 | 28 | $(srcdir)/ls.c $(srcdir)/ljs.c $(srcdir)/mntopts.c $(srcdir)/parse_num.c \ |
55f4cbd9 | 29 | $(srcdir)/pe.c $(srcdir)/pf.c $(srcdir)/ps.c \ |
63253946 | 30 | $(srcdir)/setflags.c $(srcdir)/setversion.c $(srcdir)/uuid.c \ |
3627e838 LX |
31 | $(srcdir)/ostype.c $(srcdir)/percent.c $(srcdir)/crypto_mode.c \ |
32 | $(srcdir)/fgetproject.c $(srcdir)/fsetproject.c | |
dede39bb TT |
33 | HFILES= e2p.h |
34 | ||
50e1e10f TT |
35 | LIBRARY= libe2p |
36 | LIBDIR= e2p | |
37 | ||
521e3685 | 38 | ELF_VERSION = 2.3 |
297f47a1 | 39 | ELF_SO_VERSION = 2 |
50e1e10f TT |
40 | ELF_IMAGE = libe2p |
41 | ELF_MYDIR = e2p | |
e5fa0e30 | 42 | ELF_INSTALL_DIR = $(root_libdir) |
b2420d40 | 43 | ELF_OTHER_LIBS = |
50e1e10f TT |
44 | |
45 | BSDLIB_VERSION = 2.1 | |
46 | BSDLIB_IMAGE = libe2p | |
47 | BSDLIB_MYDIR = e2p | |
e5fa0e30 | 48 | BSDLIB_INSTALL_DIR = $(root_libdir) |
50e1e10f TT |
49 | |
50 | @MAKEFILE_LIBRARY@ | |
50e1e10f TT |
51 | @MAKEFILE_ELF@ |
52 | @MAKEFILE_BSDLIB@ | |
53 | @MAKEFILE_PROFILE@ | |
50e1e10f TT |
54 | |
55 | .c.o: | |
c13351f6 | 56 | $(E) " CC $<" |
fd1677e8 | 57 | $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@ |
832cb612 | 58 | $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $< |
a46300fe | 59 | $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $< |
fd1677e8 | 60 | @PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $< |
0eb9fb99 | 61 | @ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $< |
fd1677e8 | 62 | @BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $< |
50e1e10f | 63 | |
e6441865 | 64 | e2p.pc: $(srcdir)/e2p.pc.in $(top_builddir)/config.status |
c13351f6 TT |
65 | $(E) " CONFIG.STATUS $@" |
66 | $(Q) cd $(top_builddir); CONFIG_FILES=lib/e2p/e2p.pc ./config.status | |
e6441865 | 67 | |
63253946 | 68 | tst_ostype: $(srcdir)/ostype.c |
c13351f6 TT |
69 | $(E) " LD $@" |
70 | $(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_ostype \ | |
c6431308 | 71 | $(srcdir)/ostype.c $(ALL_CFLAGS) $(ALL_LDFLAGS) |
63253946 | 72 | |
03efde8a | 73 | tst_feature: $(srcdir)/feature.c |
c13351f6 TT |
74 | $(E) " LD $@" |
75 | $(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_feature \ | |
c6431308 | 76 | $(srcdir)/feature.c $(ALL_CFLAGS) $(ALL_LDFLAGS) |
03efde8a | 77 | |
11b8ef8b | 78 | fullcheck check:: tst_ostype tst_feature |
63253946 | 79 | ./tst_ostype |
03efde8a | 80 | ./tst_feature |
63253946 | 81 | |
50e1e10f | 82 | installdirs:: |
c13351f6 TT |
83 | $(E) " MKINSTALLDIRS $(libdir) $(includedir)/e2p" |
84 | $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \ | |
4e2d9f7f | 85 | $(DESTDIR)$(includedir)/e2p $(DESTDIR)$(pkgconfigdir) |
50e1e10f TT |
86 | |
87 | install:: all installdirs | |
c13351f6 TT |
88 | $(E) " INSTALL_DATA $(libdir)/libe2p.a" |
89 | $(Q) $(INSTALL_DATA) libe2p.a $(DESTDIR)$(libdir)/libe2p.a | |
90 | -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libe2p.a | |
91 | $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libe2p.a | |
92 | $(Q) set -e; for i in $(HFILES); do \ | |
522798d3 | 93 | echo " INSTALL_DATA $(includedir)/e2p/$$i"; \ |
dede39bb TT |
94 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/e2p/$$i; \ |
95 | done | |
4e2d9f7f DM |
96 | $(E) " INSTALL_DATA $(pkgconfigdir)/e2p.pc" |
97 | $(Q) $(INSTALL_DATA) e2p.pc $(DESTDIR)$(pkgconfigdir)/e2p.pc | |
50e1e10f TT |
98 | |
99 | uninstall:: | |
e6441865 | 100 | $(RM) -f $(DESTDIR)$(libdir)/libe2p.a \ |
4e2d9f7f | 101 | $(DESTDIR)$(pkgconfigdir)/e2p.pc |
dede39bb | 102 | $(RM) -rf $(DESTDIR)$(includedir)/e2p |
50e1e10f TT |
103 | |
104 | clean:: | |
2f8d0251 | 105 | $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* |
59a220dd | 106 | $(RM) -f ../libe2p.a ../libe2p_p.a tst_ostype tst_feature e2p.pc |
63253946 | 107 | |
50e1e10f TT |
108 | mostlyclean:: clean |
109 | distclean:: clean | |
b7aa0d65 TT |
110 | $(RM) -f .depend Makefile e2p.pc \ |
111 | $(srcdir)/TAGS $(srcdir)/Makefile.in.old | |
50e1e10f | 112 | |
3ded50b3 TT |
113 | $(OBJS): subdirs |
114 | ||
50e1e10f TT |
115 | # +++ Dependency line eater +++ |
116 | # | |
117 | # Makefile dependencies follow. This must be the last section in | |
118 | # the Makefile.in file | |
119 | # | |
d1154eb4 TT |
120 | feature.o: $(srcdir)/feature.c $(top_builddir)/lib/config.h \ |
121 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
94b993d5 TT |
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 \ | |
f34af41b TT |
126 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ |
127 | $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \ | |
128 | $(top_srcdir)/lib/ext2fs/kernel-list.h | |
d1154eb4 TT |
129 | fgetflags.o: $(srcdir)/fgetflags.c $(top_builddir)/lib/config.h \ |
130 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 131 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
132 | fsetflags.o: $(srcdir)/fsetflags.c $(top_builddir)/lib/config.h \ |
133 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 134 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
135 | fgetversion.o: $(srcdir)/fgetversion.c $(top_builddir)/lib/config.h \ |
136 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 137 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
138 | fsetversion.o: $(srcdir)/fsetversion.c $(top_builddir)/lib/config.h \ |
139 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 140 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
141 | getflags.o: $(srcdir)/getflags.c $(top_builddir)/lib/config.h \ |
142 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 143 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
144 | getversion.o: $(srcdir)/getversion.c $(top_builddir)/lib/config.h \ |
145 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 146 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
147 | hashstr.o: $(srcdir)/hashstr.c $(top_builddir)/lib/config.h \ |
148 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
f606dd32 | 149 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
150 | iod.o: $(srcdir)/iod.c $(top_builddir)/lib/config.h \ |
151 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
f606dd32 | 152 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
153 | ls.o: $(srcdir)/ls.c $(top_builddir)/lib/config.h \ |
154 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
3627e838 LX |
155 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
156 | $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ | |
157 | $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \ | |
158 | $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ | |
159 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ | |
160 | $(top_srcdir)/lib/support/dqblk_v2.h \ | |
161 | $(top_srcdir)/lib/support/quotaio_tree.h | |
d1154eb4 TT |
162 | mntopts.o: $(srcdir)/mntopts.c $(top_builddir)/lib/config.h \ |
163 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 164 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
165 | parse_num.o: $(srcdir)/parse_num.c $(top_builddir)/lib/config.h \ |
166 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
797f5ef1 | 167 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
168 | pe.o: $(srcdir)/pe.c $(top_builddir)/lib/config.h \ |
169 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
170 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h | |
171 | pf.o: $(srcdir)/pf.c $(top_builddir)/lib/config.h \ | |
172 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
173 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h | |
174 | ps.o: $(srcdir)/ps.c $(top_builddir)/lib/config.h \ | |
175 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
176 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h | |
177 | setflags.o: $(srcdir)/setflags.c $(top_builddir)/lib/config.h \ | |
178 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
179 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h | |
180 | setversion.o: $(srcdir)/setversion.c $(top_builddir)/lib/config.h \ | |
181 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
182 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h | |
183 | uuid.o: $(srcdir)/uuid.c $(top_builddir)/lib/config.h \ | |
184 | $(top_builddir)/lib/dirpaths.h $(top_builddir)/lib/ext2fs/ext2_types.h \ | |
797f5ef1 | 185 | $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h |
d1154eb4 TT |
186 | ostype.o: $(srcdir)/ostype.c $(top_builddir)/lib/config.h \ |
187 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
75e93ab0 | 188 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
d1154eb4 TT |
189 | percent.o: $(srcdir)/percent.c $(top_builddir)/lib/config.h \ |
190 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
94b993d5 | 191 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h |
b59014c9 TT |
192 | crypto_mode.o: $(srcdir)/crypto_mode.c $(top_builddir)/lib/config.h \ |
193 | $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \ | |
194 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h | |
3627e838 LX |
195 | fgetproject.o: $(srcdir)/fgetproject.c $(top_builddir)/lib/config.h \ |
196 | $(top_builddir)/lib/dirpaths.h $(srcdir)/project.h \ | |
197 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ | |
198 | $(srcdir)/e2p.h | |
199 | fsetproject.o: $(srcdir)/fsetproject.c $(top_builddir)/lib/config.h \ | |
200 | $(top_builddir)/lib/dirpaths.h $(srcdir)/project.h \ | |
201 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ | |
202 | $(srcdir)/e2p.h |