Home | History | Annotate | Download | only in e2p
      1 # Makefile for the second extended file system utility functions
      2 #
      3 # Copyright (C) 1993 Remy Card (card (a] masi.ibp.fr)
      4 #
      5 # This file can be redistributed under the terms of the GNU General
      6 # Public License
      7 
      8 srcdir = @srcdir@
      9 top_srcdir = @top_srcdir@
     10 VPATH = @srcdir@
     11 top_builddir = ../..
     12 my_dir = lib/e2p
     13 INSTALL = @INSTALL@
     14 
     15 @MCONFIG@
     16 
     17 all::	e2p.pc
     18 
     19 OBJS=		feature.o fgetflags.o fsetflags.o fgetversion.o fsetversion.o \
     20 		getflags.o getversion.o hashstr.o iod.o ls.o mntopts.o \
     21 		parse_num.o pe.o pf.o ps.o setflags.o setversion.o uuid.o \
     22 		ostype.o percent.o
     23 
     24 SRCS=		$(srcdir)/feature.c $(srcdir)/fgetflags.c \
     25 		$(srcdir)/fsetflags.c $(srcdir)/fgetversion.c \
     26 		$(srcdir)/fsetversion.c $(srcdir)/getflags.c \
     27 		$(srcdir)/getversion.c $(srcdir)/hashstr.c $(srcdir)/iod.c \
     28 		$(srcdir)/ls.c $(srcdir)/mntopts.c $(srcdir)/parse_num.c \
     29 		$(srcdir)/pe.c $(srcdir)/pf.c $(srcdir)/ps.c \
     30 		$(srcdir)/setflags.c $(srcdir)/setversion.c $(srcdir)/uuid.c \
     31 		$(srcdir)/ostype.c $(srcdir)/percent.c
     32 HFILES= e2p.h
     33 
     34 LIBRARY= libe2p
     35 LIBDIR= e2p
     36 
     37 ELF_VERSION = 2.3
     38 ELF_SO_VERSION = 2
     39 ELF_IMAGE = libe2p
     40 ELF_MYDIR = e2p
     41 ELF_INSTALL_DIR = $(root_libdir)
     42 ELF_OTHER_LIBS =
     43 
     44 BSDLIB_VERSION = 2.1
     45 BSDLIB_IMAGE = libe2p
     46 BSDLIB_MYDIR = e2p
     47 BSDLIB_INSTALL_DIR = $(root_libdir)
     48 
     49 @MAKEFILE_LIBRARY@
     50 @MAKEFILE_ELF@
     51 @MAKEFILE_BSDLIB@
     52 @MAKEFILE_PROFILE@
     53 @MAKEFILE_CHECKER@
     54 
     55 .c.o:
     56 	$(E) "	CC $<"
     57 	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
     58 @PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
     59 @CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
     60 @ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
     61 @BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
     62 
     63 e2p.pc: $(srcdir)/e2p.pc.in $(top_builddir)/config.status
     64 	$(E) "	CONFIG.STATUS $@"
     65 	$(Q) cd $(top_builddir); CONFIG_FILES=lib/e2p/e2p.pc ./config.status
     66 
     67 tst_ostype: $(srcdir)/ostype.c
     68 	$(E) "	LD $@"
     69 	$(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_ostype \
     70 		$(srcdir)/ostype.c $(ALL_CFLAGS)
     71 
     72 tst_feature: $(srcdir)/feature.c
     73 	$(E) "	LD $@"
     74 	$(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_feature \
     75 		$(srcdir)/feature.c $(ALL_CFLAGS)
     76 
     77 check::	tst_ostype tst_feature
     78 	./tst_ostype
     79 	./tst_feature
     80 
     81 installdirs::
     82 	$(E) "	MKINSTALLDIRS $(libdir) $(includedir)/e2p"
     83 	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
     84 		$(DESTDIR)$(includedir)/e2p $(DESTDIR)$(libdir)/pkgconfig
     85 
     86 install:: all installdirs 
     87 	$(E) "	INSTALL_DATA $(libdir)/libe2p.a"
     88 	$(Q) $(INSTALL_DATA) libe2p.a $(DESTDIR)$(libdir)/libe2p.a
     89 	-$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libe2p.a
     90 	$(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libe2p.a
     91 	$(Q) set -e; for i in $(HFILES); do \
     92 	  echo "	INSTALL_DATA $(includedir)/e2p/$$i"; \
     93 	  $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/e2p/$$i; \
     94 	done
     95 	$(E) "	INSTALL_DATA $(libdir)/pkgconfig/e2p.pc"
     96 	$(Q) $(INSTALL_DATA) e2p.pc $(DESTDIR)$(libdir)/pkgconfig/e2p.pc
     97 
     98 uninstall::
     99 	$(RM) -f $(DESTDIR)$(libdir)/libe2p.a \
    100 		$(DESTDIR)$(libdir)/pkgconfig/e2p.pc
    101 	$(RM) -rf $(DESTDIR)$(includedir)/e2p
    102 
    103 clean::
    104 	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
    105 	$(RM) -f ../libe2p.a ../libe2p_p.a tst_ostype tst_feature
    106 
    107 mostlyclean:: clean
    108 distclean:: clean
    109 	$(RM) -f .depend Makefile e2p.pc \
    110 		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
    111 
    112 $(OBJS): subdirs
    113 
    114 # +++ Dependency line eater +++
    115 # 
    116 # Makefile dependencies follow.  This must be the last section in
    117 # the Makefile.in file
    118 #
    119 feature.o: $(srcdir)/feature.c $(srcdir)/e2p.h \
    120  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    121  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    122  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    123  $(top_builddir)/lib/ext2fs/ext2_err.h \
    124  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
    125  $(top_srcdir)/lib/ext2fs/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
    126  $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
    127 fgetflags.o: $(srcdir)/fgetflags.c $(srcdir)/e2p.h \
    128  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    129 fsetflags.o: $(srcdir)/fsetflags.c $(srcdir)/e2p.h \
    130  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    131 fgetversion.o: $(srcdir)/fgetversion.c $(srcdir)/e2p.h \
    132  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    133 fsetversion.o: $(srcdir)/fsetversion.c $(srcdir)/e2p.h \
    134  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    135 getflags.o: $(srcdir)/getflags.c $(srcdir)/e2p.h \
    136  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    137 getversion.o: $(srcdir)/getversion.c $(srcdir)/e2p.h \
    138  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    139 hashstr.o: $(srcdir)/hashstr.c $(srcdir)/e2p.h \
    140  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    141 iod.o: $(srcdir)/iod.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
    142  $(top_builddir)/lib/ext2fs/ext2_types.h
    143 ls.o: $(srcdir)/ls.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
    144  $(top_builddir)/lib/ext2fs/ext2_types.h
    145 mntopts.o: $(srcdir)/mntopts.c $(srcdir)/e2p.h \
    146  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    147 parse_num.o: $(srcdir)/parse_num.c $(srcdir)/e2p.h \
    148  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    149 pe.o: $(srcdir)/pe.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
    150  $(top_builddir)/lib/ext2fs/ext2_types.h
    151 pf.o: $(srcdir)/pf.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
    152  $(top_builddir)/lib/ext2fs/ext2_types.h
    153 ps.o: $(srcdir)/ps.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
    154  $(top_builddir)/lib/ext2fs/ext2_types.h
    155 setflags.o: $(srcdir)/setflags.c $(srcdir)/e2p.h \
    156  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    157 setversion.o: $(srcdir)/setversion.c $(srcdir)/e2p.h \
    158  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    159 uuid.o: $(srcdir)/uuid.c $(top_builddir)/lib/ext2fs/ext2_types.h \
    160  $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h
    161 ostype.o: $(srcdir)/ostype.c $(srcdir)/e2p.h \
    162  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    163 percent.o: $(srcdir)/percent.c $(srcdir)/e2p.h \
    164  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    165