6983b55
SRCS+= protocol.c
6983b55
SRCS+= engine.c
6983b55
SRCS+= bootimg.c
6983b55
SRCS+= fastboot.c
6983b55
SRCS+= usb_linux.c
6983b55
SRCS+= util_linux.c
6983b55
6983b55
VPATH+= ../libzipfile
6983b55
SRCS+= centraldir.c
6983b55
SRCS+= zipfile.c
6983b55
e6eb269
VPATH+= ../libsparse
e6eb269
SRCS+= backed_block.c
e6eb269
SRCS+= output_file.c
e6eb269
SRCS+= sparse.c
e6eb269
SRCS+= sparse_crc32.c
e6eb269
SRCS+= sparse_err.c
e6eb269
SRCS+= sparse_read.c
e6eb269
e6eb269
VPATH+= ../../extras/ext4_utils
e6eb269
SRCS+= allocate.c
e6eb269
SRCS+= contents.c
e6eb269
SRCS+= ext4_utils.c
e6eb269
SRCS+= extent.c
e6eb269
SRCS+= indirect.c
e6eb269
SRCS+= make_ext4fs.c
e6eb269
SRCS+= sha1.c
e6eb269
SRCS+= uuid.c
e6eb269
SRCS+= wipe.c
e6eb269
6983b55
CPPFLAGS+= -DADB_HOST=1
6983b55
CPPFLAGS+= -DHAVE_FORKEXEC=1
6983b55
CPPFLAGS+= -DHAVE_SYMLINKS
6983b55
CPPFLAGS+= -DHAVE_TERMIO_H
6983b55
CPPFLAGS+= -D_GNU_SOURCE
6983b55
CPPFLAGS+= -D_XOPEN_SOURCE
6983b55
CPPFLAGS+= -I.
6983b55
CPPFLAGS+= -I../include
e6eb269
CPPFLAGS+= -I../libsparse/include
6983b55
CPPFLAGS+= -I../mkbootimg
e6eb269
CPPFLAGS+= -I../../extras/ext4_utils
6983b55
b43de5f
CFLAGS+= $(RPM_OPT_FLAGS)
e6eb269
LIBS= -lrt -lpthread -lz -lselinux
6983b55
6983b55
CC= $(TOOLCHAIN)gcc
6983b55
LD= $(TOOLCHAIN)gcc
6983b55
6983b55
OBJS= $(SRCS:.c=.o)
6983b55
6983b55
all: fastboot
6983b55
6983b55
fastboot: $(OBJS)
6983b55
	$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
6983b55
6983b55
install: fastboot
6983b55
	install fastboot $(DESTDIR)$(BINDIR)
6983b55
6983b55
clean:
6983b55
	rm -rf $(OBJS)