Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 1 | # Makefile for the QUOTA library |
| 2 | # |
| 3 | |
| 4 | srcdir = @srcdir@ |
| 5 | top_srcdir = @top_srcdir@ |
| 6 | VPATH = @srcdir@ |
| 7 | top_builddir = ../.. |
| 8 | my_dir = lib/quota |
| 9 | INSTALL = @INSTALL@ |
| 10 | |
| 11 | @MCONFIG@ |
| 12 | |
| 13 | all:: |
| 14 | |
| 15 | SMANPAGES= |
| 16 | |
| 17 | |
Aditya Kali | a86d55d | 2011-11-14 10:55:54 -0500 | [diff] [blame] | 18 | OBJS= mkquota.o quotaio.o quotaio_v2.o quotaio_tree.o dict.o |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 19 | |
Aditya Kali | a86d55d | 2011-11-14 10:55:54 -0500 | [diff] [blame] | 20 | SRCS= $(srcdir)/mkquota.c \ |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 21 | $(srcdir)/quotaio.c \ |
| 22 | $(srcdir)/quotaio_tree.c \ |
| 23 | $(srcdir)/quotaio_v2.c \ |
| 24 | $(srcdir)/../../e2fsck/dict.c |
| 25 | |
| 26 | LIBRARY= libquota |
| 27 | LIBDIR= quota |
| 28 | |
Theodore Ts'o | 8f9d708 | 2011-09-19 13:39:38 -0400 | [diff] [blame] | 29 | #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'o | d5aa6a8 | 2012-08-04 16:56:55 -0400 | [diff] [blame] | 34 | #ELF_OTHER_LIBS = -lext2fs |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 35 | |
Theodore Ts'o | 8f9d708 | 2011-09-19 13:39:38 -0400 | [diff] [blame] | 36 | #BSDLIB_VERSION = 1.0 |
| 37 | #BSDLIB_IMAGE = libquota |
| 38 | #BSDLIB_MYDIR = quota |
| 39 | #BSDLIB_INSTALL_DIR = $(root_libdir) |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 40 | |
| 41 | @MAKEFILE_LIBRARY@ |
Theodore Ts'o | 8f9d708 | 2011-09-19 13:39:38 -0400 | [diff] [blame] | 42 | #MAKEFILE_ELF# |
| 43 | #MAKEFILE_BSDLIB# |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 44 | @MAKEFILE_PROFILE@ |
| 45 | @MAKEFILE_CHECKER@ |
| 46 | |
| 47 | .c.o: |
| 48 | $(E) " CC $<" |
| 49 | $(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@ |
Darrick J. Wong | 832cb61 | 2013-10-11 23:02:12 -0400 | [diff] [blame] | 50 | $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $< |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 51 | @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'o | 8f9d708 | 2011-09-19 13:39:38 -0400 | [diff] [blame] | 53 | #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 Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 55 | |
| 56 | all:: $(SMANPAGES) quota.pc |
| 57 | |
| 58 | quota.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 | |
| 62 | dict.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'o | 8f9d708 | 2011-09-19 13:39:38 -0400 | [diff] [blame] | 69 | #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 Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 73 | |
| 74 | installdirs:: |
| 75 | $(E) " MKINSTALLDIRS $(libdir) $(includedir)/quota $(man3dir)" |
| 76 | $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \ |
| 77 | $(DESTDIR)$(includedir)/quota $(DESTDIR)$(man3dir) \ |
| 78 | $(DESTDIR)$(libdir)/pkgconfig |
| 79 | |
| 80 | install:: 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'o | 449c87a | 2011-09-14 13:13:44 -0400 | [diff] [blame] | 85 | $(E) " INSTALL_DATA $(includedir)/quota/mkquota.h" |
| 86 | $(Q) $(INSTALL_DATA) $(srcdir)/mkquota.h $(DESTDIR)$(includedir)/quota/mkquota.h |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 87 | $(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 | |
| 95 | uninstall:: |
| 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 | |
| 102 | clean:: |
| 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 | |
| 109 | mostlyclean:: clean |
| 110 | distclean:: 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'o | d1154eb | 2011-09-18 17:34:37 -0400 | [diff] [blame] | 128 | mkquota.o: $(srcdir)/mkquota.c $(top_builddir)/lib/config.h \ |
| 129 | $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 130 | $(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 Kara | 2ae58b6 | 2012-06-04 12:51:55 -0400 | [diff] [blame] | 134 | $(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'o | d1154eb | 2011-09-18 17:34:37 -0400 | [diff] [blame] | 137 | quotaio.o: $(srcdir)/quotaio.c $(top_builddir)/lib/config.h \ |
| 138 | $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio.h \ |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 139 | $(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 Kara | 2ae58b6 | 2012-06-04 12:51:55 -0400 | [diff] [blame] | 144 | $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h |
Theodore Ts'o | d1154eb | 2011-09-18 17:34:37 -0400 | [diff] [blame] | 145 | quotaio_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'o | 756690a | 2011-10-03 14:57:51 -0400 | [diff] [blame] | 147 | $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ |
Jan Kara | 2ae58b6 | 2012-06-04 12:51:55 -0400 | [diff] [blame] | 148 | $(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 Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 151 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ |
| 152 | $(srcdir)/dqblk_v2.h |
Theodore Ts'o | d1154eb | 2011-09-18 17:34:37 -0400 | [diff] [blame] | 153 | quotaio_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 Kara | 2ae58b6 | 2012-06-04 12:51:55 -0400 | [diff] [blame] | 155 | $(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'o | d1154eb | 2011-09-18 17:34:37 -0400 | [diff] [blame] | 157 | $(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 Kara | 2ae58b6 | 2012-06-04 12:51:55 -0400 | [diff] [blame] | 159 | $(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'o | d1154eb | 2011-09-18 17:34:37 -0400 | [diff] [blame] | 161 | dict.o: $(srcdir)/../../e2fsck/dict.c $(top_builddir)/lib/config.h \ |
| 162 | $(top_builddir)/lib/dirpaths.h $(srcdir)/../../e2fsck/dict.h |