blob: 9b9313da89f471498ae6da67ab6027b2ecb71b0c [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001LOCAL_PATH := $(call my-dir)
2
3include $(CLEAR_VARS)
4
5LOCAL_MODULE := pigz
Matt Mowerdb220442014-10-31 22:43:59 -05006LOCAL_MODULE_TAGS := eng optional
Dees_Troy51a0e822012-09-05 15:24:24 -04007LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
8LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
Matt Mowerdb220442014-10-31 22:43:59 -05009LOCAL_CFLAGS :=
Dees_Troy51a0e822012-09-05 15:24:24 -040010LOCAL_SRC_FILES = pigz.c yarn.c
11LOCAL_C_INCLUDES += $(LOCAL_PATH) \
12 external/zlib
13LOCAL_SHARED_LIBRARIES += libz libc
14
15include $(BUILD_EXECUTABLE)
16
17PIGZ_TOOLS := unpigz
18SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(PIGZ_TOOLS))
19$(SYMLINKS): PIGZ_BINARY := $(LOCAL_MODULE)
20$(SYMLINKS): $(LOCAL_INSTALLED_MODULE)
21 @echo "Symlink: $@ -> $(PIGZ_BINARY)"
22 @mkdir -p $(dir $@)
23 @rm -rf $@
24 $(hide) ln -sf $(PIGZ_BINARY) $@
25
Matt Mower031163b2014-11-01 15:13:03 -050026include $(CLEAR_VARS)
27LOCAL_MODULE := unpigz_symlink
28LOCAL_MODULE_TAGS := optional
29LOCAL_ADDITIONAL_DEPENDENCIES := $(SYMLINKS)
30include $(BUILD_PHONY_PACKAGE)
31SYMLINKS :=