X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=e2fsprogs%2FMakefile.in;h=cd18de817a717174181e1ac929075b75cd98fc3a;hb=1781188a9d6ee045a72f37b86102380909e04539;hp=e1459e05f253c1d20f1268dc48f66d36353d038e;hpb=7ad978045dbc4bb45c0cc7b0629be18aa8d9ba7f;p=oweals%2Fbusybox.git diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in index e1459e05f..cd18de817 100644 --- a/e2fsprogs/Makefile.in +++ b/e2fsprogs/Makefile.in @@ -7,57 +7,80 @@ E2FSPROGS_AR:=e2fsprogs.a E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs +E2FSPROGS_SRC:=$(top_srcdir)/e2fsprogs -E2FSPROGS_CFLAGS := -I$(E2FSPROGS_DIR) -include $(E2FSPROGS_DIR)/e2fsbb.h +E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \ - probe.c read.c resolve.c save.c tag.c resolve.c + probe.c read.c resolve.c save.c tag.c BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC)) BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS)) -E2FSCK_SRC := badblocks.c dict.c dirinfo.c dx_dirinfo.c e2fsck.c \ - ea_refcount.c ehandler.c journal.c message.c pass1.c pass1b.c \ - pass2.c pass3.c pass4.c pass5.c problem.c recovery.c region.c \ - rehash.c revoke.c super.c swapfs.c util.c -E2FSCK_SRCS := $(patsubst %,e2fsck/%, $(E2FSCK_SRC)) -E2FSCK_OBJS := $(patsubst %.c,%.o, $(E2FSCK_SRCS)) - E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \ - feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c \ - parse_num.c + feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c \ + parse_num.c E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC)) E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS)) EXT2FS_SRC := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \ - rw_bitmaps.c initialize.c bitmaps.c block.c \ - ind_block.c inode.c freefs.c alloc_stats.c closefs.c \ - openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c \ - getsize.c getsectsize.c alloc_tables.c read_bb_file.c mkdir.c \ - bb_inode.c newdir.c alloc_sb.c lookup.c dirblock.c expanddir.c \ - dir_iterate.c link.c res_gdt.c icount.c get_pathname.c dblist.c \ - dirhash.c version.c flushb.c unlink.c check_desc.c valid_blk.c \ - ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c + rw_bitmaps.c initialize.c bitmaps.c block.c \ + ind_block.c inode.c freefs.c alloc_stats.c closefs.c \ + openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c \ + getsize.c getsectsize.c alloc_tables.c read_bb_file.c mkdir.c \ + bb_inode.c newdir.c alloc_sb.c lookup.c dirblock.c expanddir.c \ + dir_iterate.c link.c res_gdt.c icount.c get_pathname.c dblist.c \ + dirhash.c version.c flushb.c unlink.c check_desc.c valid_blk.c \ + ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c swapfs.c EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC)) EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS)) UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \ - uuid_time.c + uuid_time.c UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC)) UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS)) -E2FSPROGS-:= +# for building out-of-tree we need to make sure that the directories to hold +# the object tree are created +$(patsubst %,$(E2FSPROGS_DIR)/%, blkid e2fsck e2p ext2fs uuid): + @mkdir -p "$@" + +# make sure that the directories are order-only prerequisites. Otherwise we +# may have object files created after the timestamp of the directory was +# updated which would lead to spurious rebuilds (as some of the dentries +# may be older than the dir itself). +$(patsubst %,$(E2FSPROGS_DIR)/%, $(BLKID_OBJS)):|$(E2FSPROGS_DIR)/blkid +$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSCK_OBJS)):|$(E2FSPROGS_DIR)/e2fsck +$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2P_OBJS)):|$(E2FSPROGS_DIR)/e2p +$(patsubst %,$(E2FSPROGS_DIR)/%, $(EXT2FS_OBJS)):|$(E2FSPROGS_DIR)/ext2fs +$(patsubst %,$(E2FSPROGS_DIR)/%, $(UUID_OBJS)):|$(E2FSPROGS_DIR)/uuid + +E2FSPROGS-y:= E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS) -E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(E2FSCK_OBJS) -E2FSPROGS-$(CONFIG_FSCK) += fsck.o base_device.o +E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) +E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS) E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) +E2FSPROGS-y:=$(sort $(E2FSPROGS-y)) + +ifneq ($(strip $(E2FSPROGS-y)),) libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR) +endif + +E2FSPROGS_SRC-y:=$(patsubst %.o,$(E2FSPROGS_SRC)/%.c,$(E2FSPROGS-y)) +E2FSPROGS_SRC-a:=$(wildcard $(E2FSPROGS_SRC)/*.c) $(patsubst %,$(E2FSPROGS_SRC)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS)) +APPLET_SRC-y+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-y) +APPLET_SRC-a+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-a) + +# XXX: FIXME: change .c to include their stuff relative to $(E2FSPROGS_SRC) +E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(E2FSPROGS_SRC)/%,blkid e2fsck e2p ext2fs uuid) +APPLETS_DEFINE-y+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE) +APPLETS_DEFINE-a+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE) $(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y)) - $(AR) $(ARFLAGS) $@ $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y)) + $(do_ar) -$(E2FSPROGS_DIR)/%.o: $(E2FSPROGS_DIR)/%.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(E2FSPROGS_CFLAGS) -c -o $@ $< +$(E2FSPROGS_DIR)/%.o: $(subst $(top_builddir),$(top_srcdir),$(E2FSPROGS_DIR)/%.c) + $(compile.c) $(E2FSPROGS_CFLAGS)