xref: /aosp_15_r20/external/e2fsprogs/lib/blkid/Makefile.in (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker# Makefile for libblkid
2*6a54128fSAndroid Build Coastguard Worker#
3*6a54128fSAndroid Build Coastguard Worker# Copyright (C) 2001 Theodore Ts'o ([email protected])
4*6a54128fSAndroid Build Coastguard Worker#
5*6a54128fSAndroid Build Coastguard Worker# This file can be redistributed under the terms of the
6*6a54128fSAndroid Build Coastguard Worker# GNU Lesser General Public License
7*6a54128fSAndroid Build Coastguard Worker
8*6a54128fSAndroid Build Coastguard Workersrcdir = @srcdir@
9*6a54128fSAndroid Build Coastguard Workertop_srcdir = @top_srcdir@
10*6a54128fSAndroid Build Coastguard WorkerVPATH = @srcdir@
11*6a54128fSAndroid Build Coastguard Workertop_builddir = ../..
12*6a54128fSAndroid Build Coastguard Workermy_dir = lib/blkid
13*6a54128fSAndroid Build Coastguard WorkerINSTALL = @INSTALL@
14*6a54128fSAndroid Build Coastguard WorkerMKDIR_P = @MKDIR_P@
15*6a54128fSAndroid Build Coastguard Worker
16*6a54128fSAndroid Build Coastguard Worker@MCONFIG@
17*6a54128fSAndroid Build Coastguard Worker
18*6a54128fSAndroid Build Coastguard Workerall::
19*6a54128fSAndroid Build Coastguard Worker
20*6a54128fSAndroid Build Coastguard WorkerSMANPAGES=	libblkid.3
21*6a54128fSAndroid Build Coastguard Worker
22*6a54128fSAndroid Build Coastguard WorkerOBJS= cache.o dev.o devname.o devno.o getsize.o llseek.o probe.o \
23*6a54128fSAndroid Build Coastguard Worker read.o resolve.o save.o tag.o version.o
24*6a54128fSAndroid Build Coastguard Worker
25*6a54128fSAndroid Build Coastguard WorkerSRCS= $(srcdir)/cache.c $(srcdir)/dev.c $(srcdir)/devname.c $(srcdir)/devno.c \
26*6a54128fSAndroid Build Coastguard Worker $(srcdir)/getsize.c $(srcdir)/llseek.c $(srcdir)/probe.c \
27*6a54128fSAndroid Build Coastguard Worker $(srcdir)/read.c $(srcdir)/resolve.c $(srcdir)/save.c $(srcdir)/tag.c \
28*6a54128fSAndroid Build Coastguard Worker $(srcdir)/version.c
29*6a54128fSAndroid Build Coastguard Worker
30*6a54128fSAndroid Build Coastguard WorkerHFILES_IN=	blkid.h blkid_types.h
31*6a54128fSAndroid Build Coastguard Worker
32*6a54128fSAndroid Build Coastguard WorkerLIBRARY= libblkid
33*6a54128fSAndroid Build Coastguard WorkerLIBDIR= blkid
34*6a54128fSAndroid Build Coastguard Worker
35*6a54128fSAndroid Build Coastguard WorkerELF_VERSION = 1.0
36*6a54128fSAndroid Build Coastguard WorkerELF_SO_VERSION = 1
37*6a54128fSAndroid Build Coastguard WorkerELF_IMAGE = libblkid
38*6a54128fSAndroid Build Coastguard WorkerELF_MYDIR = blkid
39*6a54128fSAndroid Build Coastguard WorkerELF_INSTALL_DIR = $(root_libdir)
40*6a54128fSAndroid Build Coastguard WorkerELF_OTHER_LIBS = -luuid
41*6a54128fSAndroid Build Coastguard Worker
42*6a54128fSAndroid Build Coastguard WorkerBSDLIB_VERSION = 2.0
43*6a54128fSAndroid Build Coastguard WorkerBSDLIB_IMAGE = libblkid
44*6a54128fSAndroid Build Coastguard WorkerBSDLIB_MYDIR = blkid
45*6a54128fSAndroid Build Coastguard WorkerBSDLIB_INSTALL_DIR = $(root_libdir)
46*6a54128fSAndroid Build Coastguard Worker
47*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_LIBRARY@
48*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_ELF@
49*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_BSDLIB@
50*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_PROFILE@
51*6a54128fSAndroid Build Coastguard Worker
52*6a54128fSAndroid Build Coastguard WorkerLIBS_BLKID=	$(STATIC_LIBBLKID) $(STATIC_LIBUUID)
53*6a54128fSAndroid Build Coastguard WorkerDEPLIBS_BLKID=	$(DEPSTATIC_LIBBLKID) $(DEPSTATIC_LIBUUID)
54*6a54128fSAndroid Build Coastguard Worker
55*6a54128fSAndroid Build Coastguard Worker.c.o:
56*6a54128fSAndroid Build Coastguard Worker	$(E) "	CC $<"
57*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
58*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
59*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
60*6a54128fSAndroid Build Coastguard Worker@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
61*6a54128fSAndroid Build Coastguard Worker@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
62*6a54128fSAndroid Build Coastguard Worker@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
63*6a54128fSAndroid Build Coastguard Worker
64*6a54128fSAndroid Build Coastguard Workerall:: $(SMANPAGES) blkid.pc
65*6a54128fSAndroid Build Coastguard Worker
66*6a54128fSAndroid Build Coastguard Workerblkid_types.h: $(srcdir)/blkid_types.h.in $(top_builddir)/config.status
67*6a54128fSAndroid Build Coastguard Worker	$(E) "	CONFIG.STATUS $@"
68*6a54128fSAndroid Build Coastguard Worker	$(Q) cd $(top_builddir); \
69*6a54128fSAndroid Build Coastguard Worker		CONFIG_FILES=$(my_dir)/blkid_types.h ./config.status
70*6a54128fSAndroid Build Coastguard Worker
71*6a54128fSAndroid Build Coastguard Workerblkid.h: $(srcdir)/blkid.h.in
72*6a54128fSAndroid Build Coastguard Worker	$(E) "	CP $@"
73*6a54128fSAndroid Build Coastguard Worker	$(Q) cp $(srcdir)/blkid.h.in blkid.h
74*6a54128fSAndroid Build Coastguard Worker
75*6a54128fSAndroid Build Coastguard Workerlibblkid.3: $(DEP_SUBSTITUTE) $(srcdir)/libblkid.3.in
76*6a54128fSAndroid Build Coastguard Worker	$(E) "	SUBST $@"
77*6a54128fSAndroid Build Coastguard Worker	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/libblkid.3.in libblkid.3
78*6a54128fSAndroid Build Coastguard Worker
79*6a54128fSAndroid Build Coastguard Workertst_cache: $(srcdir)/cache.c $(DEPLIBS_BLKID)
80*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
81*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_cache -DTEST_PROGRAM $(srcdir)/cache.c $(LIBS_BLKID) $(ALL_CFLAGS)
82*6a54128fSAndroid Build Coastguard Worker
83*6a54128fSAndroid Build Coastguard Workertst_dev: $(srcdir)/dev.c $(DEPLIBS_BLKID)
84*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
85*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_dev -DTEST_PROGRAM $(srcdir)/dev.c $(LIBS_BLKID) $(ALL_CFLAGS)
86*6a54128fSAndroid Build Coastguard Worker
87*6a54128fSAndroid Build Coastguard Workertst_devname: $(srcdir)/devname.c $(DEPLIBS_BLKID)
88*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
89*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_devname -DTEST_PROGRAM $(srcdir)/devname.c $(LIBS_BLKID) $(ALL_CFLAGS)
90*6a54128fSAndroid Build Coastguard Worker
91*6a54128fSAndroid Build Coastguard Workertst_devno: $(srcdir)/devno.c $(DEPLIBS_BLKID)
92*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
93*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_devno -DTEST_PROGRAM $(srcdir)/devno.c $(LIBS_BLKID) $(ALL_CFLAGS)
94*6a54128fSAndroid Build Coastguard Worker
95*6a54128fSAndroid Build Coastguard Workertst_getsize: $(srcdir)/getsize.c $(DEPLIBS_BLKID)
96*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
97*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_getsize -DTEST_PROGRAM $(srcdir)/getsize.c $(LIBS_BLKID) $(ALL_CFLAGS)
98*6a54128fSAndroid Build Coastguard Worker
99*6a54128fSAndroid Build Coastguard Workertst_probe: $(srcdir)/probe.c $(DEPLIBS_BLKID)
100*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
101*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_probe -DTEST_PROGRAM $(srcdir)/probe.c $(LIBS_BLKID) $(ALL_CFLAGS)
102*6a54128fSAndroid Build Coastguard Worker
103*6a54128fSAndroid Build Coastguard Workertst_read: $(srcdir)/read.c $(DEPLIBS_BLKID)
104*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
105*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_read -DTEST_PROGRAM $(srcdir)/read.c $(LIBS_BLKID) $(ALL_CFLAGS)
106*6a54128fSAndroid Build Coastguard Worker
107*6a54128fSAndroid Build Coastguard Workertst_resolve: $(srcdir)/resolve.c $(DEPLIBS_BLKID)
108*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
109*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_resolve -DTEST_PROGRAM $(srcdir)/resolve.c $(LIBS_BLKID) $(ALL_CFLAGS)
110*6a54128fSAndroid Build Coastguard Worker
111*6a54128fSAndroid Build Coastguard Workertst_save: $(srcdir)/save.c $(DEPLIBS_BLKID)
112*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
113*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_save -DTEST_PROGRAM $(srcdir)/save.c $(LIBS_BLKID) $(ALL_CFLAGS)
114*6a54128fSAndroid Build Coastguard Worker
115*6a54128fSAndroid Build Coastguard Workertst_tag: $(srcdir)/tag.c $(DEPLIBS_BLKID)
116*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
117*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_tag -DTEST_PROGRAM $(srcdir)/tag.c $(LIBS_BLKID) $(ALL_CFLAGS)
118*6a54128fSAndroid Build Coastguard Worker
119*6a54128fSAndroid Build Coastguard Workertst_types: tst_types.o blkid_types.h
120*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
121*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o tst_types $(ALL_LDFLAGS) tst_types.o
122*6a54128fSAndroid Build Coastguard Worker
123*6a54128fSAndroid Build Coastguard Worker../../misc/blkid.o: $(top_srcdir)/misc/blkid.c blkid.h
124*6a54128fSAndroid Build Coastguard Worker	$(E) "	CC $@"
125*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) $(ALL_CFLAGS) -c $(top_srcdir)/misc/blkid.c \
126*6a54128fSAndroid Build Coastguard Worker		-o ../../misc/blkid.o
127*6a54128fSAndroid Build Coastguard Worker
128*6a54128fSAndroid Build Coastguard Workerblkid: ../../misc/blkid.o libblkid.a $(DEPLIBUUID)
129*6a54128fSAndroid Build Coastguard Worker	$(E) "	LD $@"
130*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) -o blkid ../../misc/blkid.o libblkid.a $(LIBUUID)
131*6a54128fSAndroid Build Coastguard Worker
132*6a54128fSAndroid Build Coastguard Workertest_probe: test_probe.in Makefile
133*6a54128fSAndroid Build Coastguard Worker	$(E) "Creating test_probe..."
134*6a54128fSAndroid Build Coastguard Worker	$(E) "#!/bin/sh" > test_probe
135*6a54128fSAndroid Build Coastguard Worker	$(E) "SRCDIR=@srcdir@" >> test_probe
136*6a54128fSAndroid Build Coastguard Worker	$(Q) cat $(srcdir)/test_probe.in >> test_probe
137*6a54128fSAndroid Build Coastguard Worker	$(Q) chmod +x test_probe
138*6a54128fSAndroid Build Coastguard Worker
139*6a54128fSAndroid Build Coastguard Workerfullcheck check:: all tst_cache tst_dev tst_devname tst_devno \
140*6a54128fSAndroid Build Coastguard Worker tst_getsize tst_probe tst_read tst_resolve tst_save tst_tag \
141*6a54128fSAndroid Build Coastguard Worker test_probe tst_types
142*6a54128fSAndroid Build Coastguard Worker	./test_probe
143*6a54128fSAndroid Build Coastguard Worker	./tst_types
144*6a54128fSAndroid Build Coastguard Worker
145*6a54128fSAndroid Build Coastguard Workerblkid.pc: $(srcdir)/blkid.pc.in $(top_builddir)/config.status
146*6a54128fSAndroid Build Coastguard Worker	$(E) "	CONFIG.STATUS $@"
147*6a54128fSAndroid Build Coastguard Worker	$(Q) cd $(top_builddir); CONFIG_FILES=lib/blkid/blkid.pc ./config.status
148*6a54128fSAndroid Build Coastguard Worker
149*6a54128fSAndroid Build Coastguard Workerinstalldirs::
150*6a54128fSAndroid Build Coastguard Worker	$(E) "	MKDIR_P $(libdir) $(includedir)/blkid"
151*6a54128fSAndroid Build Coastguard Worker	$(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
152*6a54128fSAndroid Build Coastguard Worker		$(DESTDIR)$(includedir)/blkid $(DESTDIR)$(pkgconfigdir)
153*6a54128fSAndroid Build Coastguard Worker
154*6a54128fSAndroid Build Coastguard Workerinstall:: all installdirs
155*6a54128fSAndroid Build Coastguard Worker	$(E) "	INSTALL_DATA $(libdir)/libblkid.a"
156*6a54128fSAndroid Build Coastguard Worker	$(Q) $(INSTALL_DATA) libblkid.a $(DESTDIR)$(libdir)/libblkid.a
157*6a54128fSAndroid Build Coastguard Worker	-$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libblkid.a
158*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libblkid.a
159*6a54128fSAndroid Build Coastguard Worker	$(Q) set -e; for i in $(HFILES_IN); do \
160*6a54128fSAndroid Build Coastguard Worker		echo "	INSTALL_DATA $(includedir)/blkid/$$i"; \
161*6a54128fSAndroid Build Coastguard Worker		$(INSTALL_DATA) $$i $(DESTDIR)$(includedir)/blkid/$$i; \
162*6a54128fSAndroid Build Coastguard Worker	done
163*6a54128fSAndroid Build Coastguard Worker	$(Q) for i in $(SMANPAGES); do \
164*6a54128fSAndroid Build Coastguard Worker		echo "	INSTALL_DATA $(man3dir)/$$i"; \
165*6a54128fSAndroid Build Coastguard Worker		$(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
166*6a54128fSAndroid Build Coastguard Worker	done
167*6a54128fSAndroid Build Coastguard Worker	$(E) "	INSTALL_DATA $(pkgconfigdir)/blkid.pc"
168*6a54128fSAndroid Build Coastguard Worker	$(Q) $(INSTALL_DATA) blkid.pc $(DESTDIR)$(pkgconfigdir)/blkid.pc
169*6a54128fSAndroid Build Coastguard Worker
170*6a54128fSAndroid Build Coastguard Workeruninstall::
171*6a54128fSAndroid Build Coastguard Worker	$(RM) -f $(DESTDIR)$(libdir)/libblkid.a \
172*6a54128fSAndroid Build Coastguard Worker		$(DESTDIR)$(pkgconfigdir)/blkid.pc
173*6a54128fSAndroid Build Coastguard Worker	$(RM) -rf $(DESTDIR)$(includedir)/blkid
174*6a54128fSAndroid Build Coastguard Worker	for i in $(SMANPAGES); do \
175*6a54128fSAndroid Build Coastguard Worker		$(RM) -f $(DESTDIR)$(man3dir)/$$i; \
176*6a54128fSAndroid Build Coastguard Worker	done
177*6a54128fSAndroid Build Coastguard Worker
178*6a54128fSAndroid Build Coastguard Workerclean::
179*6a54128fSAndroid Build Coastguard Worker	$(RM) -f \#* *.s *.o *.orig *.a *~ *.bak tst_cache tst_dev tst_devname \
180*6a54128fSAndroid Build Coastguard Worker		tst_devno tst_getsize tst_probe tst_read tst_resolve tst_save \
181*6a54128fSAndroid Build Coastguard Worker		tst_tag tst_types tests/*.out tests/*.ok \
182*6a54128fSAndroid Build Coastguard Worker		tests/*.img results test_probe core profiled/* \
183*6a54128fSAndroid Build Coastguard Worker		blkid.h blkid_types.h ../libblkid.a ../libblkid_p.a \
184*6a54128fSAndroid Build Coastguard Worker		$(SMANPAGES) blkid blkid.pc
185*6a54128fSAndroid Build Coastguard Worker	@echo rmdir tests/tmp tests
186*6a54128fSAndroid Build Coastguard Worker	@(rmdir tests/tmp tests 2> /dev/null ; exit 0)
187*6a54128fSAndroid Build Coastguard Worker
188*6a54128fSAndroid Build Coastguard Workermostlyclean:: clean
189*6a54128fSAndroid Build Coastguard Workerdistclean:: clean
190*6a54128fSAndroid Build Coastguard Worker	$(RM) -f .depend Makefile blkid.pc \
191*6a54128fSAndroid Build Coastguard Worker		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
192*6a54128fSAndroid Build Coastguard Worker
193*6a54128fSAndroid Build Coastguard Worker$(OBJS): subdirs $(HFILES_IN)
194*6a54128fSAndroid Build Coastguard Worker
195*6a54128fSAndroid Build Coastguard Worker# +++ Dependency line eater +++
196*6a54128fSAndroid Build Coastguard Worker#
197*6a54128fSAndroid Build Coastguard Worker# Makefile dependencies follow.  This must be the last section in
198*6a54128fSAndroid Build Coastguard Worker# the Makefile.in file
199*6a54128fSAndroid Build Coastguard Worker#
200*6a54128fSAndroid Build Coastguard Workercache.o: $(srcdir)/cache.c $(top_builddir)/lib/config.h \
201*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
202*6a54128fSAndroid Build Coastguard Workerdev.o: $(srcdir)/dev.c $(top_builddir)/lib/config.h \
203*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
204*6a54128fSAndroid Build Coastguard Workerdevname.o: $(srcdir)/devname.c $(top_builddir)/lib/config.h \
205*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
206*6a54128fSAndroid Build Coastguard Workerdevno.o: $(srcdir)/devno.c $(top_builddir)/lib/config.h \
207*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
208*6a54128fSAndroid Build Coastguard Workergetsize.o: $(srcdir)/getsize.c $(top_builddir)/lib/config.h \
209*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
210*6a54128fSAndroid Build Coastguard Workerllseek.o: $(srcdir)/llseek.c $(top_builddir)/lib/config.h \
211*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
212*6a54128fSAndroid Build Coastguard Workerprobe.o: $(srcdir)/probe.c $(top_builddir)/lib/config.h \
213*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h \
214*6a54128fSAndroid Build Coastguard Worker $(srcdir)/probe.h
215*6a54128fSAndroid Build Coastguard Workerread.o: $(srcdir)/read.c $(top_builddir)/lib/config.h \
216*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
217*6a54128fSAndroid Build Coastguard Workerresolve.o: $(srcdir)/resolve.c $(top_builddir)/lib/config.h \
218*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
219*6a54128fSAndroid Build Coastguard Workersave.o: $(srcdir)/save.c $(top_builddir)/lib/config.h \
220*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
221*6a54128fSAndroid Build Coastguard Workertag.o: $(srcdir)/tag.c $(top_builddir)/lib/config.h \
222*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
223*6a54128fSAndroid Build Coastguard Workerversion.o: $(srcdir)/version.c $(top_builddir)/lib/config.h \
224*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(top_srcdir)/version.h
225