Mike Frysinger | d89e5e6 | 2005-04-24 05:15:12 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
| 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
| 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Mike Frysinger | d89e5e6 | 2005-04-24 05:15:12 +0000 | [diff] [blame] | 6 | |
| 7 | E2FSPROGS_AR:=e2fsprogs.a |
Rob Landley | e1d9633 | 2005-08-24 00:41:52 +0000 | [diff] [blame] | 8 | |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 9 | E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs |
Rob Landley | e1d9633 | 2005-08-24 00:41:52 +0000 | [diff] [blame] | 10 | |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 11 | E2FSPROGS_CFLAGS := -I$(E2FSPROGS_DIR) -include $(E2FSPROGS_DIR)/e2fsbb.h |
Eric Andersen | 9cc7f32 | 2005-05-11 23:20:09 +0000 | [diff] [blame] | 12 | |
"Vladimir N. Oleynik" | b71e602 | 2005-09-19 13:48:39 +0000 | [diff] [blame] | 13 | BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \ |
"Vladimir N. Oleynik" | 3978e55 | 2005-09-27 11:43:29 +0000 | [diff] [blame] | 14 | probe.c read.c resolve.c save.c tag.c resolve.c |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 15 | BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC)) |
| 16 | BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS)) |
| 17 | |
"Vladimir N. Oleynik" | 3978e55 | 2005-09-27 11:43:29 +0000 | [diff] [blame] | 18 | E2FSCK_SRCS := e2fsck.c |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 19 | E2FSCK_OBJS := $(patsubst %.c,%.o, $(E2FSCK_SRCS)) |
| 20 | |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 21 | E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \ |
"Vladimir N. Oleynik" | 3978e55 | 2005-09-27 11:43:29 +0000 | [diff] [blame] | 22 | feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c \ |
| 23 | parse_num.c |
Mike Frysinger | f3d2884 | 2005-06-11 00:27:50 +0000 | [diff] [blame] | 24 | E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC)) |
| 25 | E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS)) |
Eric Andersen | 9cc7f32 | 2005-05-11 23:20:09 +0000 | [diff] [blame] | 26 | |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 27 | EXT2FS_SRC := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \ |
"Vladimir N. Oleynik" | 3978e55 | 2005-09-27 11:43:29 +0000 | [diff] [blame] | 28 | rw_bitmaps.c initialize.c bitmaps.c block.c \ |
| 29 | ind_block.c inode.c freefs.c alloc_stats.c closefs.c \ |
| 30 | openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c \ |
| 31 | getsize.c getsectsize.c alloc_tables.c read_bb_file.c mkdir.c \ |
| 32 | bb_inode.c newdir.c alloc_sb.c lookup.c dirblock.c expanddir.c \ |
| 33 | dir_iterate.c link.c res_gdt.c icount.c get_pathname.c dblist.c \ |
| 34 | dirhash.c version.c flushb.c unlink.c check_desc.c valid_blk.c \ |
| 35 | ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 36 | EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC)) |
| 37 | EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS)) |
| 38 | |
| 39 | UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \ |
"Vladimir N. Oleynik" | 3978e55 | 2005-09-27 11:43:29 +0000 | [diff] [blame] | 40 | uuid_time.c |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 41 | UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC)) |
| 42 | UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS)) |
| 43 | |
Mike Frysinger | d89e5e6 | 2005-04-24 05:15:12 +0000 | [diff] [blame] | 44 | E2FSPROGS-:= |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 45 | E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS) |
Mike Frysinger | 7ad9780 | 2005-09-25 05:18:04 +0000 | [diff] [blame] | 46 | E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(E2FSCK_OBJS) |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 47 | E2FSPROGS-$(CONFIG_FSCK) += fsck.o base_device.o |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 48 | E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS) |
Mike Frysinger | 6447ac0 | 2005-06-11 05:29:40 +0000 | [diff] [blame] | 49 | E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) |
Mike Frysinger | 174808c | 2005-06-11 01:14:09 +0000 | [diff] [blame] | 50 | E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) |
Mike Frysinger | d89e5e6 | 2005-04-24 05:15:12 +0000 | [diff] [blame] | 51 | |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 52 | libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR) |
Mike Frysinger | d89e5e6 | 2005-04-24 05:15:12 +0000 | [diff] [blame] | 53 | |
Eric Andersen | 9cc7f32 | 2005-05-11 23:20:09 +0000 | [diff] [blame] | 54 | |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 55 | $(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y)) |
| 56 | $(AR) $(ARFLAGS) $@ $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y)) |
Mike Frysinger | d89e5e6 | 2005-04-24 05:15:12 +0000 | [diff] [blame] | 57 | |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 58 | $(E2FSPROGS_DIR)/%.o: $(E2FSPROGS_DIR)/%.c |
Mike Frysinger | 7ffce0c | 2005-06-11 00:45:50 +0000 | [diff] [blame] | 59 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(E2FSPROGS_CFLAGS) -c -o $@ $< |