blob: f7cd30ca0a6b4ae8c7eea0a8837f208bd2df34c4 [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001package_arch = $(subst -,_,${PACKAGE_ARCH})
rjw03fe4c02022-02-16 10:40:11 +08002rpm_bin=${bindir}/rpm2cpio
3
4ifeq ("$(wildcard $(rpm_bin))","")
5 rpm_bin=rpm2cpio
6endif
xjb04a4022021-11-25 15:01:52 +08007
8#default toolchain is gcc
9toolchain = gcc
10#default use prop
11property = prop
12ifneq ($(findstring clang, ${CC}),)
13# clang
14toolchain = clang
15endif
16
17ifneq ($(findstring mt2731, ${TARGET_PLATFORM}),)
18# only 2731 use libsncfg
19property = sncfg
20endif
21
rjw03fe4c02022-02-16 10:40:11 +080022ifneq ($(findstring mt2735, ${TARGET_PLATFORM}),)
23# only 2735 use glibc 2.28
24toolchain = gcc_glibc_2.28
25endif
26
xjb04a4022021-11-25 15:01:52 +080027lib_path = usr/lib
28
29ifneq ($(findstring aarch64, ${package_arch}),)
30# aarch64
31lib_path = usr/lib64
32endif
33
34
35all:
36
37install:
rjw03fe4c02022-02-16 10:40:11 +080038 find -name "*.$(package_arch)_$(property)_$(toolchain).rpm" | while read i; do echo $${i}; ${rpm_bin} $${i} | cpio -idmv ; done
xjb04a4022021-11-25 15:01:52 +080039
40 install -d $(DESTDIR)/usr/bin/
41 install -m 0755 usr/bin/aee_aed $(DESTDIR)/usr/bin
42 install -m 0755 usr/bin/aee_core_forwarder $(DESTDIR)/usr/bin
43 install -d $(DESTDIR)/$(lib_path)/
44 install -m 0755 $(lib_path)/libaed.so $(DESTDIR)/$(lib_path)
45
46
47uninstall:
48 rm -f $(DESTDIR)/usr/bin/aee_aed
49 rm -f $(DESTDIR)/usr/bin/aee_core_forwarder
50 rm -f $(DESTDIR)/$(lib_path)/libaed.so
51
52clean:
53 $(warning "aee make clean")