Koushik Dutta | 01d17e0 | 2013-02-26 22:45:57 -0800 | [diff] [blame] | 1 | # Root AOSP source makefile |
| 2 | # su is built here, and |
Maarten Derks | 65287de | 2021-02-13 01:12:48 +0530 | [diff] [blame] | 3 | ifeq ($(FP2_USE_APPOPS_SU), true) |
| 4 | |
Diogo Ferreira | 9c14774 | 2014-12-16 19:41:01 +0000 | [diff] [blame] | 5 | LOCAL_PATH := $(call my-dir) |
Steve Kondik | 810f96d | 2016-09-06 00:39:50 -0700 | [diff] [blame] | 6 | |
Koushik Dutta | db0b359 | 2013-02-28 18:08:51 -0800 | [diff] [blame] | 7 | include $(CLEAR_VARS) |
Koushik Dutta | fef458b | 2013-02-26 23:46:44 -0800 | [diff] [blame] | 8 | |
Koushik Dutta | 01d17e0 | 2013-02-26 22:45:57 -0800 | [diff] [blame] | 9 | LOCAL_MODULE := su |
Luca Stefani | 3d372ab | 2018-08-26 12:59:35 +0200 | [diff] [blame] | 10 | LOCAL_SHARED_LIBRARIES := \ |
Christopher N. Hesse | cc52043 | 2018-01-07 20:01:14 +0100 | [diff] [blame] | 11 | libbinder \ |
| 12 | libcutils \ |
| 13 | liblog \ |
Christopher N. Hesse | cc52043 | 2018-01-07 20:01:14 +0100 | [diff] [blame] | 14 | libutils \ |
Luca Stefani | 3d372ab | 2018-08-26 12:59:35 +0200 | [diff] [blame] | 15 | |
Diogo Ferreira | 9c14774 | 2014-12-16 19:41:01 +0000 | [diff] [blame] | 16 | LOCAL_SRC_FILES := su.c daemon.c utils.c pts.c |
| 17 | LOCAL_SRC_FILES += binder/appops-wrapper.cpp binder/pm-wrapper.c |
Luca Stefani | bce2976 | 2017-01-22 23:09:15 +0100 | [diff] [blame] | 18 | LOCAL_CFLAGS += -Werror -Wall |
Koushik Dutta | bc01b94 | 2013-02-26 23:02:37 -0800 | [diff] [blame] | 19 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) |
Steve Kondik | 810f96d | 2016-09-06 00:39:50 -0700 | [diff] [blame] | 20 | |
| 21 | LOCAL_INIT_RC := superuser.rc |
| 22 | |
Koushik Dutta | 01d17e0 | 2013-02-26 22:45:57 -0800 | [diff] [blame] | 23 | include $(BUILD_EXECUTABLE) |
| 24 | |
Koushik Dutta | 2cd157d | 2013-03-06 12:10:03 -0800 | [diff] [blame] | 25 | SYMLINKS := $(addprefix $(TARGET_OUT)/bin/,su) |
Chih-Wei Huang | cd953bd | 2013-08-15 18:49:06 +0800 | [diff] [blame] | 26 | $(SYMLINKS): |
Koushik Dutta | 2cd157d | 2013-03-06 12:10:03 -0800 | [diff] [blame] | 27 | @echo "Symlink: $@ -> /system/xbin/su" |
| 28 | @mkdir -p $(dir $@) |
| 29 | @rm -rf $@ |
Chih-Wei Huang | cd953bd | 2013-08-15 18:49:06 +0800 | [diff] [blame] | 30 | $(hide) ln -sf ../xbin/su $@ |
Koushik Dutta | 2cd157d | 2013-03-06 12:10:03 -0800 | [diff] [blame] | 31 | |
Diogo Ferreira | 9c14774 | 2014-12-16 19:41:01 +0000 | [diff] [blame] | 32 | # We need this so that the installed files could be picked up based on the |
| 33 | # local module name |
Koushik Dutta | 8c918b2 | 2013-07-27 21:21:54 -0700 | [diff] [blame] | 34 | ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ |
Steve Kondik | 810f96d | 2016-09-06 00:39:50 -0700 | [diff] [blame] | 35 | $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) |
Evan Anderson | 70d5169 | 2013-07-31 14:43:32 -0500 | [diff] [blame] | 36 | |
Maarten Derks | 65287de | 2021-02-13 01:12:48 +0530 | [diff] [blame] | 37 | endif |