2005-04-24 10:45:12 +05:30
|
|
|
# Makefile for busybox
|
|
|
|
#
|
|
|
|
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
|
|
|
#
|
2005-09-24 11:31:57 +05:30
|
|
|
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
2005-04-24 10:45:12 +05:30
|
|
|
|
|
|
|
E2FSPROGS_AR:=e2fsprogs.a
|
2005-08-24 06:11:52 +05:30
|
|
|
|
2005-09-24 12:41:16 +05:30
|
|
|
E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs
|
2005-09-30 13:55:50 +05:30
|
|
|
E2FSPROGS_INC:=$(top_sourcedir)/e2fsprogs
|
2005-08-24 06:11:52 +05:30
|
|
|
|
2005-09-30 13:55:50 +05:30
|
|
|
E2FSPROGS_CFLAGS := -I$(E2FSPROGS_INC) -include $(E2FSPROGS_INC)/e2fsbb.h
|
2005-05-12 04:50:09 +05:30
|
|
|
|
2005-09-19 19:18:39 +05:30
|
|
|
BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \
|
2005-09-30 13:55:50 +05:30
|
|
|
probe.c read.c resolve.c save.c tag.c
|
2005-06-11 06:44:09 +05:30
|
|
|
BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC))
|
|
|
|
BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS))
|
|
|
|
|
2005-09-27 17:13:29 +05:30
|
|
|
E2FSCK_SRCS := e2fsck.c
|
2005-09-24 12:41:16 +05:30
|
|
|
E2FSCK_OBJS := $(patsubst %.c,%.o, $(E2FSCK_SRCS))
|
|
|
|
|
2005-06-11 06:44:09 +05:30
|
|
|
E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \
|
2005-09-27 17:13:29 +05:30
|
|
|
feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c \
|
|
|
|
parse_num.c
|
2005-06-11 05:57:50 +05:30
|
|
|
E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC))
|
|
|
|
E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS))
|
2005-05-12 04:50:09 +05:30
|
|
|
|
2005-06-11 06:44:09 +05:30
|
|
|
EXT2FS_SRC := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \
|
2005-09-27 17:13:29 +05:30
|
|
|
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
|
2005-06-11 06:44:09 +05:30
|
|
|
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 \
|
2005-09-27 17:13:29 +05:30
|
|
|
uuid_time.c
|
2005-06-11 06:44:09 +05:30
|
|
|
UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC))
|
|
|
|
UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS))
|
|
|
|
|
2005-04-24 10:45:12 +05:30
|
|
|
E2FSPROGS-:=
|
2005-06-11 06:44:09 +05:30
|
|
|
E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS)
|
2005-09-25 10:48:04 +05:30
|
|
|
E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(E2FSCK_OBJS)
|
2005-09-24 12:41:16 +05:30
|
|
|
E2FSPROGS-$(CONFIG_FSCK) += fsck.o base_device.o
|
2005-06-11 06:44:09 +05:30
|
|
|
E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS)
|
2005-06-11 10:59:40 +05:30
|
|
|
E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
2005-06-11 06:44:09 +05:30
|
|
|
E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
2005-04-24 10:45:12 +05:30
|
|
|
|
2005-09-24 12:41:16 +05:30
|
|
|
libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR)
|
2005-04-24 10:45:12 +05:30
|
|
|
|
2005-05-12 04:50:09 +05:30
|
|
|
|
2005-09-24 12:41:16 +05:30
|
|
|
$(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
|
|
|
|
$(AR) $(ARFLAGS) $@ $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
|
2005-04-24 10:45:12 +05:30
|
|
|
|
2005-09-24 12:41:16 +05:30
|
|
|
$(E2FSPROGS_DIR)/%.o: $(E2FSPROGS_DIR)/%.c
|
2005-06-11 06:15:50 +05:30
|
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(E2FSPROGS_CFLAGS) -c -o $@ $<
|