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
|
NAME = fastboot
SOURCES = bootimg_utils.cpp \
engine.cpp \
fastboot.cpp \
fs.cpp\
protocol.cpp \
socket.cpp \
tcp.cpp \
udp.cpp \
util.cpp \
usb_linux.cpp \
util_linux.cpp
SOURCES := $(foreach source, $(SOURCES), fastboot/$(source))
CXXFLAGS += -fpermissive
CPPFLAGS += -DUSE_F2FS -DFASTBOOT_REVISION='"$(DEB_VERSION)"' \
-Iinclude \
-Imkbootimg \
-Iadb \
-Ibase/include \
-I/usr/include/android/ext4_utils \
-I/usr/include/android/f2fs_utils \
-I/usr/include/openssl \
-Ilibsparse/include
LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
-Wl,-rpath-link=. \
-L. -lziparchive -lsparse -lbase -lcutils -ladb \
-L/usr/lib/$(DEB_HOST_MULTIARCH)/android -lext4_utils -lf2fs_utils
build: $(SOURCES)
$(CXX) $^ -o fastboot/$(NAME) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
clean:
$(RM) fastboot/$(NAME)
|