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 	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
     59 @PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
     60 @CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
     61 @ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
     62 @BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
     63 
     64 e2p.pc: $(srcdir)/e2p.pc.in $(top_builddir)/config.status
     65 	$(E) "	CONFIG.STATUS $@"
     66 	$(Q) cd $(top_builddir); CONFIG_FILES=lib/e2p/e2p.pc ./config.status
     67 
     68 tst_ostype: $(srcdir)/ostype.c
     69 	$(E) "	LD $@"
     70 	$(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_ostype \
     71 		$(srcdir)/ostype.c $(ALL_CFLAGS)
     72 
     73 tst_feature: $(srcdir)/feature.c
     74 	$(E) "	LD $@"
     75 	$(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_feature \
     76 		$(srcdir)/feature.c $(ALL_CFLAGS)
     77 
     78 check::	tst_ostype tst_feature
     79 	./tst_ostype
     80 	./tst_feature
     81 
     82 installdirs::
     83 	$(E) "	MKINSTALLDIRS $(libdir) $(includedir)/e2p"
     84 	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
     85 		$(DESTDIR)$(includedir)/e2p $(DESTDIR)$(libdir)/pkgconfig
     86 
     87 install:: all installdirs 
     88 	$(E) "	INSTALL_DATA $(libdir)/libe2p.a"
     89 	$(Q) $(INSTALL_DATA) libe2p.a $(DESTDIR)$(libdir)/libe2p.a
     90 	-$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libe2p.a
     91 	$(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libe2p.a
     92 	$(Q) set -e; for i in $(HFILES); do \
     93 	  echo "	INSTALL_DATA $(includedir)/e2p/$$i"; \
     94 	  $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/e2p/$$i; \
     95 	done
     96 	$(E) "	INSTALL_DATA $(libdir)/pkgconfig/e2p.pc"
     97 	$(Q) $(INSTALL_DATA) e2p.pc $(DESTDIR)$(libdir)/pkgconfig/e2p.pc
     98 
     99 uninstall::
    100 	$(RM) -f $(DESTDIR)$(libdir)/libe2p.a \
    101 		$(DESTDIR)$(libdir)/pkgconfig/e2p.pc
    102 	$(RM) -rf $(DESTDIR)$(includedir)/e2p
    103 
    104 clean::
    105 	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
    106 	$(RM) -f ../libe2p.a ../libe2p_p.a tst_ostype tst_feature
    107 
    108 mostlyclean:: clean
    109 distclean:: clean
    110 	$(RM) -f .depend Makefile e2p.pc \
    111 		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
    112 
    113 $(OBJS): subdirs
    114 
    115 # +++ Dependency line eater +++
    116 # 
    117 # Makefile dependencies follow.  This must be the last section in
    118 # the Makefile.in file
    119 #
    120 feature.o: $(srcdir)/feature.c $(top_builddir)/lib/config.h \
    121  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    122  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    123  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    124  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    125  $(top_builddir)/lib/ext2fs/ext2_err.h \
    126  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
    127  $(top_srcdir)/lib/ext2fs/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
    128  $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
    129 fgetflags.o: $(srcdir)/fgetflags.c $(top_builddir)/lib/config.h \
    130  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    131  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    132 fsetflags.o: $(srcdir)/fsetflags.c $(top_builddir)/lib/config.h \
    133  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    134  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    135 fgetversion.o: $(srcdir)/fgetversion.c $(top_builddir)/lib/config.h \
    136  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    137  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    138 fsetversion.o: $(srcdir)/fsetversion.c $(top_builddir)/lib/config.h \
    139  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    140  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    141 getflags.o: $(srcdir)/getflags.c $(top_builddir)/lib/config.h \
    142  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    143  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    144 getversion.o: $(srcdir)/getversion.c $(top_builddir)/lib/config.h \
    145  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    146  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    147 hashstr.o: $(srcdir)/hashstr.c $(top_builddir)/lib/config.h \
    148  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    149  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    150 iod.o: $(srcdir)/iod.c $(top_builddir)/lib/config.h \
    151  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    152  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    153 ls.o: $(srcdir)/ls.c $(top_builddir)/lib/config.h \
    154  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    155  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    156 mntopts.o: $(srcdir)/mntopts.c $(top_builddir)/lib/config.h \
    157  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    158  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    159 parse_num.o: $(srcdir)/parse_num.c $(top_builddir)/lib/config.h \
    160  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    161  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    162 pe.o: $(srcdir)/pe.c $(top_builddir)/lib/config.h \
    163  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    164  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    165 pf.o: $(srcdir)/pf.c $(top_builddir)/lib/config.h \
    166  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    167  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    168 ps.o: $(srcdir)/ps.c $(top_builddir)/lib/config.h \
    169  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    170  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    171 setflags.o: $(srcdir)/setflags.c $(top_builddir)/lib/config.h \
    172  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    173  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    174 setversion.o: $(srcdir)/setversion.c $(top_builddir)/lib/config.h \
    175  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    176  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    177 uuid.o: $(srcdir)/uuid.c $(top_builddir)/lib/config.h \
    178  $(top_builddir)/lib/dirpaths.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    179  $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h
    180 ostype.o: $(srcdir)/ostype.c $(top_builddir)/lib/config.h \
    181  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    182  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    183 percent.o: $(srcdir)/percent.c $(top_builddir)/lib/config.h \
    184  $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
    185  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
    186