mirror of https://github.com/vitalif/e2fsprogs
157 lines
5.1 KiB
Makefile
157 lines
5.1 KiB
Makefile
# Makefile for libblkid
|
|
#
|
|
# Copyright (C) 2001 Theodore Ts'o (tytso@mit.edu)
|
|
#
|
|
# This file can be redistributed under the terms of the
|
|
# GNU Lesser General Public License
|
|
|
|
srcdir = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
VPATH = @srcdir@
|
|
top_builddir = ../..
|
|
my_dir = lib/blkid
|
|
INSTALL = @INSTALL@
|
|
|
|
@MCONFIG@
|
|
|
|
all::
|
|
|
|
SMANPAGES= libblkid.3
|
|
|
|
OBJS= cache.o dev.o devname.o devno.o getsize.o llseek.o probe.o \
|
|
read.o resolve.o save.o tag.o
|
|
|
|
SRCS= $(srcdir)/cache.c $(srcdir)/dev.c $(srcdir)/devname.c $(srcdir)/devno.c \
|
|
$(srcdir)/getsize.c $(srcdir)/llseek.c $(srcdir)/probe.c \
|
|
$(srcdir)/read.c $(srcdir)/resolve.c $(srcdir)/save.c $(srcdir)/tag.c
|
|
|
|
HFILES= blkid.h list.h
|
|
HFILES_IN= blkid_types.h
|
|
|
|
LIBRARY= libblkid
|
|
LIBDIR= blkid
|
|
|
|
ELF_VERSION = 2.0
|
|
ELF_SO_VERSION = 2
|
|
ELF_IMAGE = libblkid
|
|
ELF_MYDIR = blkid
|
|
ELF_INSTALL_DIR = $(root_libdir)
|
|
ELF_OTHER_LIBS =
|
|
|
|
BSDLIB_VERSION = 2.0
|
|
BSDLIB_IMAGE = libblkid
|
|
BSDLIB_MYDIR = blkid
|
|
BSDLIB_INSTALL_DIR = $(root_libdir)
|
|
|
|
@MAKEFILE_LIBRARY@
|
|
@MAKEFILE_DLL@
|
|
@MAKEFILE_ELF@
|
|
@MAKEFILE_BSDLIB@
|
|
@MAKEFILE_PROFILE@
|
|
@MAKEFILE_CHECKER@
|
|
|
|
LIBS_BLKID= $(STATIC_LIBBLKID) $(STATIC_LIBUUID)
|
|
DEPLIBS_BLKID= $(DEPSTATIC_LIBBLKID) $(DEPSTATIC_LIBUUID)
|
|
|
|
.c.o:
|
|
$(CC) -Wall $(ALL_CFLAGS) -c $< -o $@
|
|
@PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
|
|
@CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
|
|
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
|
|
@DLL_CMT@ -o jump/$*.o -c $<)
|
|
@ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
|
|
@BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
|
|
|
|
all:: $(SMANPAGES)
|
|
|
|
libblkid.3: $(DEP_SUBSTITUTE) $(srcdir)/libblkid.3.in
|
|
$(SUBSTITUTE) $(srcdir)/libblkid.3.in libblkid.3
|
|
|
|
tst_cache: $(srcdir)/cache.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_cache -DTEST_PROGRAM $(srcdir)/cache.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
|
|
|
tst_dev: $(srcdir)/dev.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_dev -DTEST_PROGRAM $(srcdir)/dev.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
|
|
|
tst_devname: $(srcdir)/devname.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_devname -DTEST_PROGRAM $(srcdir)/devname.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
|
|
|
tst_devno: $(srcdir)/devno.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_devno -DTEST_PROGRAM $(srcdir)/devno.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
|
|
|
tst_getsize: $(srcdir)/getsize.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_getsize -DTEST_PROGRAM $(srcdir)/getsize.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
|
|
|
tst_probe: $(srcdir)/probe.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_probe -DTEST_PROGRAM $(srcdir)/probe.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
|
|
|
tst_read: $(srcdir)/read.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_read -DTEST_PROGRAM $(srcdir)/read.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
|
|
|
tst_resolve: $(srcdir)/resolve.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_resolve -DTEST_PROGRAM $(srcdir)/resolve.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
|
|
|
tst_save: $(srcdir)/save.c $(DEPLIBS_BLKID)
|
|
$(CC) -Wall -o tst_save -DTEST_PROGRAM $(srcdir)/save.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
|
|
|
check:: tst_cache tst_dev tst_devname tst_devno tst_getsize tst_probe \
|
|
tst_read tst_resolve tst_save
|
|
|
|
installdirs::
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
|
|
$(DESTDIR)$(includedir)/blkid
|
|
|
|
install:: all installdirs
|
|
$(INSTALL_DATA) libblkid.a $(DESTDIR)$(libdir)/libblkid.a
|
|
$(CHMOD) 644 $(DESTDIR)$(libdir)/libblkid.a
|
|
-$(RANLIB) $(DESTDIR)$(libdir)/libblkid.a
|
|
$(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libblkid.a
|
|
set -e; for i in $(HFILES); do \
|
|
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/blkid/$$i; \
|
|
done
|
|
set -e; for i in $(HFILES_IN); do \
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(includedir)/blkid/$$i; \
|
|
done
|
|
for i in $(SMANPAGES); do \
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
|
|
done
|
|
|
|
uninstall::
|
|
$(RM) -f $(DESTDIR)$(libdir)/libblkid.a
|
|
$(RM) -rf $(DESTDIR)$(includedir)/blkid
|
|
for i in $(SMANPAGES); do \
|
|
$(RM) -f $(DESTDIR)$(man3dir)/$$i; \
|
|
done
|
|
|
|
clean::
|
|
$(RM) -f \#* *.s *.o *.orig *.a *~ *.bak tst_* core profiled/* checker/*
|
|
$(RM) -f ../libblkid.a ../libblkid_p.a $(SMANPAGES)
|
|
|
|
mostlyclean:: clean
|
|
distclean:: clean
|
|
$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
|
|
|
|
# +++ Dependency line eater +++
|
|
#
|
|
# Makefile dependencies follow. This must be the last section in
|
|
# the Makefile.in file
|
|
#
|
|
cache.o: $(srcdir)/cache.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|
|
dev.o: $(srcdir)/dev.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|
|
devname.o: $(srcdir)/devname.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|
|
devno.o: $(srcdir)/devno.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|
|
getsize.o: $(srcdir)/getsize.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|
|
llseek.o: $(srcdir)/llseek.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|
|
read.o: $(srcdir)/read.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h $(top_srcdir)/lib/uuid/uuid.h
|
|
save.o: $(srcdir)/save.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|
|
tag.o: $(srcdir)/tag.c $(srcdir)/blkid.h $(srcdir)/list.h \
|
|
$(top_builddir)/lib/blkid/blkid_types.h
|