• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8srcdir = @srcdir@
9top_srcdir = @top_srcdir@
10VPATH = @srcdir@
11top_builddir = ../..
12my_dir = lib/e2p
13INSTALL = @INSTALL@
14
15@MCONFIG@
16
17all::	e2p.pc
18
19OBJS=		feature.o fgetflags.o fsetflags.o fgetversion.o fsetversion.o \
20		getflags.o getversion.o hashstr.o iod.o ls.o mntopts.o \
21		parse_num.o pe.o pf.o ps.o setflags.o setversion.o uuid.o \
22		ostype.o percent.o
23
24SRCS=		$(srcdir)/feature.c $(srcdir)/fgetflags.c \
25		$(srcdir)/fsetflags.c $(srcdir)/fgetversion.c \
26		$(srcdir)/fsetversion.c $(srcdir)/getflags.c \
27		$(srcdir)/getversion.c $(srcdir)/hashstr.c $(srcdir)/iod.c \
28		$(srcdir)/ls.c $(srcdir)/mntopts.c $(srcdir)/parse_num.c \
29		$(srcdir)/pe.c $(srcdir)/pf.c $(srcdir)/ps.c \
30		$(srcdir)/setflags.c $(srcdir)/setversion.c $(srcdir)/uuid.c \
31		$(srcdir)/ostype.c $(srcdir)/percent.c
32HFILES= e2p.h
33
34LIBRARY= libe2p
35LIBDIR= e2p
36
37ELF_VERSION = 2.3
38ELF_SO_VERSION = 2
39ELF_IMAGE = libe2p
40ELF_MYDIR = e2p
41ELF_INSTALL_DIR = $(root_libdir)
42ELF_OTHER_LIBS =
43
44BSDLIB_VERSION = 2.1
45BSDLIB_IMAGE = libe2p
46BSDLIB_MYDIR = e2p
47BSDLIB_INSTALL_DIR = $(root_libdir)
48
49@MAKEFILE_LIBRARY@
50@MAKEFILE_ELF@
51@MAKEFILE_BSDLIB@
52@MAKEFILE_PROFILE@
53@MAKEFILE_CHECKER@
54
55.c.o:
56	$(E) "	CC $<"
57	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
58	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
59@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
60@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
61@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
62@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
63
64e2p.pc: $(srcdir)/e2p.pc.in $(top_builddir)/config.status
65	$(E) "	CONFIG.STATUS $@"
66	$(Q) cd $(top_builddir); CONFIG_FILES=lib/e2p/e2p.pc ./config.status
67
68tst_ostype: $(srcdir)/ostype.c
69	$(E) "	LD $@"
70	$(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_ostype \
71		$(srcdir)/ostype.c $(ALL_CFLAGS)
72
73tst_feature: $(srcdir)/feature.c
74	$(E) "	LD $@"
75	$(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_feature \
76		$(srcdir)/feature.c $(ALL_CFLAGS)
77
78check::	tst_ostype tst_feature
79	./tst_ostype
80	./tst_feature
81
82installdirs::
83	$(E) "	MKINSTALLDIRS $(libdir) $(includedir)/e2p"
84	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
85		$(DESTDIR)$(includedir)/e2p $(DESTDIR)$(libdir)/pkgconfig
86
87install:: all installdirs
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 \
93	  echo "	INSTALL_DATA $(includedir)/e2p/$$i"; \
94	  $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/e2p/$$i; \
95	done
96	$(E) "	INSTALL_DATA $(libdir)/pkgconfig/e2p.pc"
97	$(Q) $(INSTALL_DATA) e2p.pc $(DESTDIR)$(libdir)/pkgconfig/e2p.pc
98
99uninstall::
100	$(RM) -f $(DESTDIR)$(libdir)/libe2p.a \
101		$(DESTDIR)$(libdir)/pkgconfig/e2p.pc
102	$(RM) -rf $(DESTDIR)$(includedir)/e2p
103
104clean::
105	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
106	$(RM) -f ../libe2p.a ../libe2p_p.a tst_ostype tst_feature
107
108mostlyclean:: clean
109distclean:: clean
110	$(RM) -f .depend Makefile e2p.pc \
111		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
112
113$(OBJS): subdirs
114
115# +++ Dependency line eater +++
116#
117# Makefile dependencies follow.  This must be the last section in
118# the Makefile.in file
119#
120feature.o: $(srcdir)/feature.c $(top_builddir)/lib/config.h \
121 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.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/bitops.h \
127 $(top_srcdir)/lib/ext2fs/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
128 $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
129fgetflags.o: $(srcdir)/fgetflags.c $(top_builddir)/lib/config.h \
130 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
131 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
132fsetflags.o: $(srcdir)/fsetflags.c $(top_builddir)/lib/config.h \
133 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
134 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
135fgetversion.o: $(srcdir)/fgetversion.c $(top_builddir)/lib/config.h \
136 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
137 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
138fsetversion.o: $(srcdir)/fsetversion.c $(top_builddir)/lib/config.h \
139 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
140 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
141getflags.o: $(srcdir)/getflags.c $(top_builddir)/lib/config.h \
142 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
143 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
144getversion.o: $(srcdir)/getversion.c $(top_builddir)/lib/config.h \
145 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
146 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
147hashstr.o: $(srcdir)/hashstr.c $(top_builddir)/lib/config.h \
148 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
149 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
150iod.o: $(srcdir)/iod.c $(top_builddir)/lib/config.h \
151 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
152 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
153ls.o: $(srcdir)/ls.c $(top_builddir)/lib/config.h \
154 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
155 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
156mntopts.o: $(srcdir)/mntopts.c $(top_builddir)/lib/config.h \
157 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
158 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
159parse_num.o: $(srcdir)/parse_num.c $(top_builddir)/lib/config.h \
160 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
161 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
162pe.o: $(srcdir)/pe.c $(top_builddir)/lib/config.h \
163 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
164 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
165pf.o: $(srcdir)/pf.c $(top_builddir)/lib/config.h \
166 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
167 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
168ps.o: $(srcdir)/ps.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
171setflags.o: $(srcdir)/setflags.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
174setversion.o: $(srcdir)/setversion.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
177uuid.o: $(srcdir)/uuid.c $(top_builddir)/lib/config.h \
178 $(top_builddir)/lib/dirpaths.h $(top_builddir)/lib/ext2fs/ext2_types.h \
179 $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h
180ostype.o: $(srcdir)/ostype.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
183percent.o: $(srcdir)/percent.c $(top_builddir)/lib/config.h \
184 $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
185 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
186