summaryrefslogtreecommitdiff
path: root/e2fsprogs/Makefile.in
blob: cd358497531db1e29dd0fb1c307782b56ea58bfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Makefile for busybox
#
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.

E2FSPROGS_AR:=e2fsprogs.a

E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs/

srcdir=$(top_srcdir)/e2fsprogs

E2FSPROGS_CFLAGS := -I$(srcdir) -include $(srcdir)/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
BLKID_SRCS  := $(patsubst %,blkid/%, $(BLKID_SRC))
BLKID_OBJS  := $(patsubst %.c,%.o, $(BLKID_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
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
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_SRCS   := $(patsubst %,uuid/%, $(UUID_SRC))
UUID_OBJS   := $(patsubst %.c,%.o, $(UUID_SRCS))

E2FSPROGS-:=
E2FSPROGS-$(CONFIG_CHATTR)     += chattr.o $(E2P_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)

libraries-y+=$(E2FSPROGS_DIR)$(E2FSPROGS_AR)


$(E2FSPROGS_DIR)$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)%, $(E2FSPROGS-y))
	$(AR) $(ARFLAGS) $@ $(patsubst %,$(E2FSPROGS_DIR)%, $(E2FSPROGS-y))

$(E2FSPROGS_DIR)%.o: $(srcdir)/%.c
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(E2FSPROGS_CFLAGS) -c -o $@ $<