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