1# Makefile for e2fsprog's internal support
2#
3
4srcdir = @srcdir@
5top_srcdir = @top_srcdir@
6VPATH = @srcdir@
7top_builddir = ../..
8my_dir = lib/support
9INSTALL = @INSTALL@
10
11@MCONFIG@
12
13all::
14
15OBJS=		cstring.o \
16		mkquota.o \
17		plausible.o \
18		profile.o \
19		parse_qtype.o \
20		profile_helpers.o \
21		prof_err.o \
22		quotaio.o \
23		quotaio_v2.o \
24		quotaio_tree.o \
25		dict.o
26
27SRCS=		$(srcdir)/argv_parse.c \
28		$(srcdir)/cstring.c \
29		$(srcdir)/mkquota.c \
30		$(srcdir)/parse_qtype.c \
31		$(srcdir)/plausible.c \
32		$(srcdir)/profile.c \
33		$(srcdir)/profile_helpers.c \
34		prof_err.c \
35		$(srcdir)/quotaio.c \
36		$(srcdir)/quotaio_tree.c \
37		$(srcdir)/quotaio_v2.c \
38		$(srcdir)/dict.c
39
40LIBRARY= libsupport
41LIBDIR= support
42
43@MAKEFILE_LIBRARY@
44@MAKEFILE_PROFILE@
45
46COMPILE_ET=	_ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
47
48.c.o:
49	$(E) "	CC $<"
50	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
51	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
52	$(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
53@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
54
55installdirs::
56
57install:: all
58
59uninstall::
60
61prof_err.c prof_err.h: prof_err.et
62	$(E) "	COMPILE_ET prof_err.et"
63	$(Q) $(COMPILE_ET) $(srcdir)/prof_err.et
64
65test_profile: $(srcdir)/profile.c profile_helpers.o argv_parse.o \
66		prof_err.o profile.h $(DEPSTATIC_LIBCOM_ERR)
67	$(E) "	LD $@"
68	$(Q) $(CC) -o test_profile -DDEBUG_PROGRAM $(srcdir)/profile.c prof_err.o \
69		profile_helpers.o argv_parse.o $(STATIC_LIBCOM_ERR) \
70		$(ALL_CFLAGS)
71
72test_cstring: $(srcdir)/cstring.c
73	$(E) " CC $@"
74	$(Q) $(CC) -o test_cstring -DDEBUG_PROGRAM $(srcdir)/cstring.c \
75		$(ALL_CFLAGS)
76
77clean::
78	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* \
79		../libsupport.a ../libsupport_p.a $(SMANPAGES) \
80		prof_err.c prof_err.h test_profile test_cstring
81
82#fullcheck check:: tst_uuid
83#	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_uuid
84
85mostlyclean:: clean
86distclean:: clean
87	$(RM) -f .depend Makefile \
88		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
89
90#
91# Hack to parallel makes recognize dependencies correctly.
92#
93../../lib/libsupport.a: libsupport.a
94../../lib/libsupport.so: image
95../../lib/libsupport.dylib: image
96
97$(OBJS):
98
99# +++ Dependency line eater +++
100#
101# Makefile dependencies follow.  This must be the last section in
102# the Makefile.in file
103#
104argv_parse.o: $(srcdir)/argv_parse.c $(top_builddir)/lib/config.h \
105 $(top_builddir)/lib/dirpaths.h $(srcdir)/argv_parse.h
106cstring.o: $(srcdir)/cstring.c $(top_builddir)/lib/config.h \
107 $(top_builddir)/lib/dirpaths.h $(srcdir)/cstring.h
108mkquota.o: $(srcdir)/mkquota.c $(top_builddir)/lib/config.h \
109 $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
110 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
111 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
112 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
113 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
114 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h \
115 $(srcdir)/quotaio.h $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h \
116 $(srcdir)/quotaio_v2.h $(srcdir)/common.h $(srcdir)/dict.h
117parse_qtype.o: $(srcdir)/parse_qtype.c $(top_builddir)/lib/config.h \
118 $(top_builddir)/lib/dirpaths.h $(srcdir)/quotaio.h \
119 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
120 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
121 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
122 $(top_builddir)/lib/ext2fs/ext2_err.h \
123 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
124 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h \
125 $(srcdir)/quotaio_tree.h
126plausible.o: $(srcdir)/plausible.c $(top_builddir)/lib/config.h \
127 $(top_builddir)/lib/dirpaths.h $(srcdir)/plausible.h \
128 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
129 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
130 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
131 $(top_builddir)/lib/ext2fs/ext2_err.h \
132 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
133 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/nls-enable.h
134profile.o: $(srcdir)/profile.c $(top_builddir)/lib/config.h \
135 $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
136 $(srcdir)/profile.h prof_err.h
137profile_helpers.o: $(srcdir)/profile_helpers.c $(top_builddir)/lib/config.h \
138 $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
139 $(srcdir)/profile.h $(srcdir)/profile_helpers.h prof_err.h
140prof_err.o: prof_err.c
141quotaio.o: $(srcdir)/quotaio.c $(top_builddir)/lib/config.h \
142 $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \
143 $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio.h \
144 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
145 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
146 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
147 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
148 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h \
149 $(srcdir)/quotaio_tree.h
150quotaio_tree.o: $(srcdir)/quotaio_tree.c $(top_builddir)/lib/config.h \
151 $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \
152 $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio_tree.h \
153 $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
154 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
155 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
156 $(top_builddir)/lib/ext2fs/ext2_err.h \
157 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
158 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h
159quotaio_v2.o: $(srcdir)/quotaio_v2.c $(top_builddir)/lib/config.h \
160 $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \
161 $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio_v2.h \
162 $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2_fs.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 $(srcdir)/dqblk_v2.h \
168 $(srcdir)/quotaio_tree.h
169dict.o: $(srcdir)/dict.c $(top_builddir)/lib/config.h \
170 $(top_builddir)/lib/dirpaths.h $(srcdir)/dict.h
171