File fastboot-Makefile of Package android-tools

SRCS+= protocol.c
SRCS+= engine.c
SRCS+= bootimg.c
SRCS+= fastboot.c
SRCS+= fs.c
SRCS+= usb_linux.c
SRCS+= util.c
SRCS+= util_linux.c

VPATH+= ../libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c

VPATH+= ../libsparse
SRCS+= backed_block.c
SRCS+= output_file.c
SRCS+= sparse.c
SRCS+= sparse_crc32.c
SRCS+= sparse_err.c
SRCS+= sparse_read.c

VPATH+= ../extras/ext4_utils
SRCS+= allocate.c
SRCS+= contents.c
SRCS+= crc16.c
SRCS+= ext4_utils.c
SRCS+= ext4_sb.c
SRCS+= extent.c
SRCS+= indirect.c
SRCS+= make_ext4fs.c
SRCS+= sha1.c
SRCS+= uuid.c
SRCS+= wipe.c

VPATH+= ../extras/f2fs_utils
SRCS+= f2fs_utils.c
SRCS+= f2fs_dlutils.c
SRCS+= f2fs_ioutils.c

VPATH+= ../libselinux/src
SRCS+= callbacks.c
SRCS+= check_context.c
SRCS+= freecon.c
SRCS+= init.c
SRCS+= label.c
SRCS+= label_android_property.c
SRCS+= label_file.c

CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_OFF64_T=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -DNULL=0
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
CPPFLAGS+= -I../libsparse/include
CPPFLAGS+= -I../mkbootimg
CPPFLAGS+= -I../extras/ext4_utils
CPPFLAGS+= -I../extras/f2fs_utils
CPPFLAGS+= -I../libselinux/include
CPPFLAGS+= -I../f2fs-tools/include
CPPFLAGS+= -I../f2fs-tools/mkfs

CFLAGS+= $(RPM_OPT_FLAGS) -std=gnu99
LIBS= -lpthread -lz -ldl -lpcre

CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc

OBJS= $(SRCS:.c=.o)

all: fastboot

fastboot: $(OBJS)
	$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)

install: fastboot
	install fastboot $(DESTDIR)$(BINDIR)

clean:
	rm -rf $(OBJS)