| package_arch = $(subst -,_,${PACKAGE_ARCH}) |
| rpm_bin=${bindir}/rpm2cpio |
| |
| ifeq ("$(wildcard $(rpm_bin))","") |
| rpm_bin=rpm2cpio |
| endif |
| |
| #default toolchain is gcc |
| toolchain = gcc |
| #default use prop |
| property = prop |
| ifneq ($(findstring clang, ${CC}),) |
| # clang |
| toolchain = clang |
| endif |
| |
| ifneq ($(findstring mt2731, ${TARGET_PLATFORM}),) |
| # only 2731 use libsncfg |
| property = sncfg |
| endif |
| |
| ifneq ($(findstring mt2735, ${TARGET_PLATFORM}),) |
| # only 2735 use glibc 2.28 |
| toolchain = gcc_glibc_2.28 |
| endif |
| |
| lib_path = usr/lib |
| |
| ifneq ($(findstring aarch64, ${package_arch}),) |
| # aarch64 |
| lib_path = usr/lib64 |
| endif |
| |
| |
| all: |
| |
| install: |
| find -name "*.$(package_arch)_$(property)_$(toolchain).rpm" | while read i; do echo $${i}; ${rpm_bin} $${i} | cpio -idmv ; done |
| |
| install -d $(DESTDIR)/usr/bin/ |
| install -m 0755 usr/bin/aee_aed $(DESTDIR)/usr/bin |
| install -m 0755 usr/bin/aee_core_forwarder $(DESTDIR)/usr/bin |
| install -d $(DESTDIR)/$(lib_path)/ |
| install -m 0755 $(lib_path)/libaed.so $(DESTDIR)/$(lib_path) |
| |
| |
| uninstall: |
| rm -f $(DESTDIR)/usr/bin/aee_aed |
| rm -f $(DESTDIR)/usr/bin/aee_core_forwarder |
| rm -f $(DESTDIR)/$(lib_path)/libaed.so |
| |
| clean: |
| $(warning "aee make clean") |