blob: ec4f6c45824fd77d4ee24e6a5e1b50e2a8329fca [file] [log] [blame]
Aditya Kalif239fef2011-07-20 11:40:02 -07001# Makefile for the QUOTA library
2#
3
4srcdir = @srcdir@
5top_srcdir = @top_srcdir@
6VPATH = @srcdir@
7top_builddir = ../..
8my_dir = lib/quota
9INSTALL = @INSTALL@
10
11@MCONFIG@
12
13all::
14
15SMANPAGES=
16
17
Aditya Kalia86d55d2011-11-14 10:55:54 -050018OBJS= mkquota.o quotaio.o quotaio_v2.o quotaio_tree.o dict.o
Aditya Kalif239fef2011-07-20 11:40:02 -070019
Aditya Kalia86d55d2011-11-14 10:55:54 -050020SRCS= $(srcdir)/mkquota.c \
Aditya Kalif239fef2011-07-20 11:40:02 -070021 $(srcdir)/quotaio.c \
22 $(srcdir)/quotaio_tree.c \
23 $(srcdir)/quotaio_v2.c \
24 $(srcdir)/../../e2fsck/dict.c
25
26LIBRARY= libquota
27LIBDIR= quota
28
Theodore Ts'o8f9d7082011-09-19 13:39:38 -040029#ELF_VERSION = 1.0
30#ELF_SO_VERSION = 1
31#ELF_IMAGE = libquota
32#ELF_MYDIR = quota
33#ELF_INSTALL_DIR = $(root_libdir)
Theodore Ts'od5aa6a82012-08-04 16:56:55 -040034#ELF_OTHER_LIBS = -lext2fs
Aditya Kalif239fef2011-07-20 11:40:02 -070035
Theodore Ts'o8f9d7082011-09-19 13:39:38 -040036#BSDLIB_VERSION = 1.0
37#BSDLIB_IMAGE = libquota
38#BSDLIB_MYDIR = quota
39#BSDLIB_INSTALL_DIR = $(root_libdir)
Aditya Kalif239fef2011-07-20 11:40:02 -070040
41@MAKEFILE_LIBRARY@
Theodore Ts'o8f9d7082011-09-19 13:39:38 -040042#MAKEFILE_ELF#
43#MAKEFILE_BSDLIB#
Aditya Kalif239fef2011-07-20 11:40:02 -070044@MAKEFILE_PROFILE@
45@MAKEFILE_CHECKER@
46
47.c.o:
48 $(E) " CC $<"
49 $(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
Darrick J. Wong832cb612013-10-11 23:02:12 -040050 $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
Aditya Kalif239fef2011-07-20 11:40:02 -070051@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
52@CHECKER_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
Theodore Ts'o8f9d7082011-09-19 13:39:38 -040053#ELF_CMT# $(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
54#BSDLIB_CMT# $(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
Aditya Kalif239fef2011-07-20 11:40:02 -070055
56all:: $(SMANPAGES) quota.pc
57
58quota.pc: $(srcdir)/quota.pc.in $(top_builddir)/config.status
59 $(E) " CONFIG.STATUS $@"
60 $(Q) cd $(top_builddir); CONFIG_FILES=lib/quota/quota.pc ./config.status
61
62dict.o:
63 $(E) " CC $<"
64 $(Q) $(CC) -c $(ALL_CFLAGS) $(top_srcdir)/e2fsck/dict.c -o $@
65@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/dict.o -c \
66@PROFILE_CMT@ $(top_srcdir)/e2fsck/dict.c
67@CHECKER_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c \
68@CHECKER_CMT@ $(top_srcdir)/e2fsck/dict.c
Theodore Ts'o8f9d7082011-09-19 13:39:38 -040069#ELF_CMT# $(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c \
70#ELF_CMT# $(top_srcdir)/e2fsck/dict.c
71#BSDLIB_CMT# $(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c \
72#BSDLIB_CMT# $(top_srcdir)/e2fsck/dict.c
Aditya Kalif239fef2011-07-20 11:40:02 -070073
74installdirs::
75 $(E) " MKINSTALLDIRS $(libdir) $(includedir)/quota $(man3dir)"
76 $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
77 $(DESTDIR)$(includedir)/quota $(DESTDIR)$(man3dir) \
78 $(DESTDIR)$(libdir)/pkgconfig
79
80install:: all installdirs
81 $(E) " INSTALL_DATA $(libdir)/libquota.a"
82 $(Q) $(INSTALL_DATA) libquota.a $(DESTDIR)$(libdir)/libquota.a
83 -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libquota.a
84 $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libquota.a
Theodore Ts'o449c87a2011-09-14 13:13:44 -040085 $(E) " INSTALL_DATA $(includedir)/quota/mkquota.h"
86 $(Q) $(INSTALL_DATA) $(srcdir)/mkquota.h $(DESTDIR)$(includedir)/quota/mkquota.h
Aditya Kalif239fef2011-07-20 11:40:02 -070087 $(Q) for i in $(SMANPAGES); do \
88 $(RM) -f $(DESTDIR)$(man3dir)/$$i.gz; \
89 echo " INSTALL_DATA $(man3dir)/$$i"; \
90 $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
91 done
92 $(E) " INSTALL_DATA $(libdir)/pkgconfig/quota.pc"
93 $(Q) $(INSTALL_DATA) quota.pc $(DESTDIR)$(libdir)/pkgconfig/quota.pc
94
95uninstall::
96 $(RM) -f $(DESTDIR)$(libdir)/libquota.a \
97 $(DESTDIR)$(libdir)/pkgconfig/quota.pc
98 for i in $(SMANPAGES); do \
99 $(RM) -f $(DESTDIR)$(man3dir)/$$i; \
100 done
101
102clean::
103 $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
104 $(RM) -f ../libquota.a ../libquota_p.a $(SMANPAGES)
105
106#check:: tst_uuid
107# LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_uuid
108
109mostlyclean:: clean
110distclean:: clean
111 $(RM) -f .depend Makefile quota.pc \
112 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
113
114#
115# Hack to parallel makes recognize dependencies correctly.
116#
117../../lib/libquota.a: libquota.a
118../../lib/libquota.so: image
119../../lib/libquota.dylib: image
120
121$(OBJS):
122
123# +++ Dependency line eater +++
124#
125# Makefile dependencies follow. This must be the last section in
126# the Makefile.in file
127#
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400128mkquota.o: $(srcdir)/mkquota.c $(top_builddir)/lib/config.h \
129 $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
Aditya Kalif239fef2011-07-20 11:40:02 -0700130 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
131 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
132 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
133 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
Jan Kara2ae58b62012-06-04 12:51:55 -0400134 $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/quotaio.h $(srcdir)/dqblk_v2.h \
135 $(srcdir)/quotaio_tree.h $(srcdir)/quotaio_v2.h $(srcdir)/mkquota.h \
136 $(top_srcdir)/lib/../e2fsck/dict.h $(srcdir)/common.h
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400137quotaio.o: $(srcdir)/quotaio.c $(top_builddir)/lib/config.h \
138 $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio.h \
Aditya Kalif239fef2011-07-20 11:40:02 -0700139 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
140 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
141 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
142 $(top_builddir)/lib/ext2fs/ext2_err.h \
143 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
Jan Kara2ae58b62012-06-04 12:51:55 -0400144 $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400145quotaio_tree.o: $(srcdir)/quotaio_tree.c $(top_builddir)/lib/config.h \
146 $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio_tree.h \
Theodore Ts'o756690a2011-10-03 14:57:51 -0400147 $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
Jan Kara2ae58b62012-06-04 12:51:55 -0400148 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
149 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
150 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
Aditya Kalif239fef2011-07-20 11:40:02 -0700151 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
152 $(srcdir)/dqblk_v2.h
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400153quotaio_v2.o: $(srcdir)/quotaio_v2.c $(top_builddir)/lib/config.h \
154 $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio_v2.h \
Jan Kara2ae58b62012-06-04 12:51:55 -0400155 $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
156 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400157 $(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 \
Jan Kara2ae58b62012-06-04 12:51:55 -0400159 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
160 $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400161dict.o: $(srcdir)/../../e2fsck/dict.c $(top_builddir)/lib/config.h \
162 $(top_builddir)/lib/dirpaths.h $(srcdir)/../../e2fsck/dict.h