-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
84 lines (66 loc) · 2.66 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
CFLAGS = -fno-short-enums -U_DEBUG -DARM_ARCH_7A -DLE_ENABLE -DUSE_SYSLOG -Iinc -Isrc -DDEFAULT_DOMAIN_ID=3
LDFLAGS = -fPIC -pie -Wl,--version-script=src/symbols.lst -ldl -lpthread -lm
prefix := /usr/local
bindir := $(prefix)/bin
libdir := $(prefix)/lib
LIBADSPRPC_SRC_FILES := src/fastrpc_apps_user.c \
src/remotectl_stub.c \
src/listener_android.c \
src/adsp_current_process_stub.c \
src/adsp_current_process1_stub.c \
src/apps_std_skel.c \
src/apps_std_imp.c \
src/apps_mem_imp.c \
src/apps_mem_skel.c \
src/rpcmem_android.c \
src/apps_remotectl_skel.c \
src/std.c \
src/std_path.c \
src/std_mem.c \
src/std_dtoa.c \
src/std_strlprintf.c \
src/BufBound.c \
src/std_SwapBytes.c \
src/smath.c \
src/atomic.c \
src/cae.c \
src/adspmsgd_apps_skel.c \
src/adspmsgd_adsp_stub.c \
src/adspmsgd_adsp1_stub.c \
src/adspmsgd_apps.c \
src/platform_libs.c \
src/pl_list.c \
src/log_config.c \
src/gpls.c \
src/adsp_perf_stub.c \
src/fastrpc_perf.c \
src/mod_table.c
LIBADSPRPC_OBJ := $(LIBADSPRPC_SRC_FILES:.c=.o)
LIBDEFAULT_LISTENER_SRC_FILES := src/adsp_default_listener.c \
src/adsp_default_listener_stub.c \
src/std.c \
src/std_mem.c
LIBDEFAULT_LISTENER_OBJ := $(LIBDEFAULT_LISTENER_SRC_FILES:.c=.o)
ADSPRPCD_SRC_FILES := src/cdsprpcd.c
ADSPRPCD_OBJ := $(ADSPRPCD_SRC_FILES:.c=.o)
%.o: %.c
$(CC) -fpic -pie $(CFLAGS) -c $< -o $@
cdsprpcd: $(ADSPRPCD_OBJ) libcdsp_default_listener.so
echo $(LD) -fpic -pie $(LDFLAGS) -o cdsprpcd
$(CC) -fpic -pie -fPIC -pie -Wl,--version-script=src/symbols.lst -ldl -lpthread -lm $(ADSPRPCD_OBJ) -o cdsprpcd -lcdsp_default_listener -L.
echo "cdsprpcd built successfully"
LDFLAGS = -fPIC -pie -Wl,--version-script=src/symbols.lst -shared -ldl -lpthread -lm
libcdsp_default_listener.so: $(LIBDEFAULT_LISTENER_OBJ) libcdsprpc.so
echo $(LD) -fpic -pie -shared $(LDFLAGS) -o libcdsp_default_listener.so
$(CC) -fpic -pie -shared -fPIC -pie -Wl,--version-script=src/adsp_def_symbols.lst -ldl -lpthread -lm $(LIBDEFAULT_LISTENER_OBJ) -o libcdsp_default_listener.so -lcdsprpc -L.
echo "libcdsp_default_listener built successfully"
libcdsprpc.so: $(LIBADSPRPC_OBJ)
echo $(LD) -fpic -pie -shared $(LDFLAGS) -o libcdsprpc.so
$(CC) -fpic -pie -shared $(LDFLAGS) $(LIBADSPRPC_OBJ) -o libcdsprpc.so
echo "libcdsprpc built successfully"
all: libcdsprpc.so libcdsp_default_listener.so cdsprpcd
echo "All binaries built"
install: libcdsprpc.so libcdsp_default_listener.so cdsprpcd
@install -D -m 755 libcdsprpc.so $(DESTDIR)$(libdir)/libcdsprpc.so
@install -D -m 755 libcdsp_default_listener.so $(DESTDIR)$(libdir)/libcdsp_default_listener.so
@install -D -m 755 cdsprpcd $(DESTDIR)$(bindir)/cdsprpcd