Makefile.in 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Makefile for busybox
  2. #
  3. # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
  4. #
  5. # Licensed under the GPL v2, see the file LICENSE in this tarball.
  6. E2FSPROGS_AR:=e2fsprogs.a
  7. E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs
  8. E2FSPROGS_SRC:=$(top_srcdir)/e2fsprogs
  9. E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h
  10. BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \
  11. probe.c read.c resolve.c save.c tag.c
  12. BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC))
  13. BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS))
  14. E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \
  15. feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c \
  16. parse_num.c
  17. E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC))
  18. E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS))
  19. EXT2FS_SRC := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \
  20. rw_bitmaps.c initialize.c bitmaps.c block.c \
  21. ind_block.c inode.c freefs.c alloc_stats.c closefs.c \
  22. openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c \
  23. getsize.c getsectsize.c alloc_tables.c read_bb_file.c mkdir.c \
  24. bb_inode.c newdir.c alloc_sb.c lookup.c dirblock.c expanddir.c \
  25. dir_iterate.c link.c res_gdt.c icount.c get_pathname.c dblist.c \
  26. dirhash.c version.c flushb.c unlink.c check_desc.c valid_blk.c \
  27. ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c swapfs.c
  28. EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC))
  29. EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS))
  30. UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \
  31. uuid_time.c
  32. UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC))
  33. UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS))
  34. # for building out-of-tree we need to make sure that the directories to hold
  35. # the object tree are created
  36. $(patsubst %,$(E2FSPROGS_DIR)/%, blkid e2fsck e2p ext2fs uuid):
  37. @mkdir -p "$@"
  38. # make sure that the directories are order-only prerequisites. Otherwise we
  39. # may have object files created after the timestamp of the directory was
  40. # updated which would lead to spurious rebuilds (as some of the dentries
  41. # may be older than the dir itself).
  42. $(patsubst %,$(E2FSPROGS_DIR)/%, $(BLKID_OBJS)):|$(E2FSPROGS_DIR)/blkid
  43. $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSCK_OBJS)):|$(E2FSPROGS_DIR)/e2fsck
  44. $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2P_OBJS)):|$(E2FSPROGS_DIR)/e2p
  45. $(patsubst %,$(E2FSPROGS_DIR)/%, $(EXT2FS_OBJS)):|$(E2FSPROGS_DIR)/ext2fs
  46. $(patsubst %,$(E2FSPROGS_DIR)/%, $(UUID_OBJS)):|$(E2FSPROGS_DIR)/uuid
  47. E2FSPROGS-y:=
  48. E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS)
  49. E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
  50. E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
  51. E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS)
  52. E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
  53. E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
  54. E2FSPROGS-y:=$(sort $(E2FSPROGS-y))
  55. ifneq ($(strip $(E2FSPROGS-y)),)
  56. libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR)
  57. endif
  58. E2FSPROGS_SRC-y:=$(patsubst %.o,$(E2FSPROGS_SRC)/%.c,$(E2FSPROGS-y))
  59. E2FSPROGS_SRC-a:=$(wildcard $(E2FSPROGS_SRC)/*.c) $(patsubst %,$(E2FSPROGS_SRC)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS))
  60. APPLET_SRC-y+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-y)
  61. APPLET_SRC-a+=$(E2FSPROGS_CFLAGS) $(E2FSPROGS_SRC-a)
  62. # XXX: FIXME: change .c to include their stuff relative to $(E2FSPROGS_SRC)
  63. E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(E2FSPROGS_SRC)/%,blkid e2fsck e2p ext2fs uuid)
  64. APPLETS_DEFINE-y+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
  65. APPLETS_DEFINE-a+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
  66. $(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
  67. $(do_ar)
  68. $(E2FSPROGS_DIR)/%.o: $(subst $(top_builddir),$(top_srcdir),$(E2FSPROGS_DIR)/%.c)
  69. $(compile.c) $(E2FSPROGS_CFLAGS)