[Action] Update pr checker to make core dump
[platform/adaptation/npu/trix-engine.git] / debian / rules
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 #export DH_VERBOSE = 1
5
6
7 # see FEATURE AREAS in dpkg-buildflags(1)
8 #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
9
10 # see ENVIRONMENT in dpkg-buildflags(1)
11 # package maintainers to append CFLAGS
12 #export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
13 # package maintainers to append LDFLAGS
14 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
15
16 ROOT_DIR:=$(shell pwd)
17 export NPU_TRINITY_INSTALL_PREFIX=/opt/trinity
18 export LC_ALL=C.UTF-8
19
20 %:
21         dh $@ --parallel
22
23 override_dh_auto_clean:
24         rm -rf build
25         rm -rf debian/tmp
26
27 override_dh_auto_configure:
28         PKG_CONFIG_PATH=${NPU_TRINITY_INSTALL_PREFIX}/lib/pkgconfig meson --buildtype=plain --prefix=$(NPU_TRINITY_INSTALL_PREFIX) --sysconfdir=$(NPU_TRINITY_INSTALL_PREFIX)/etc --libdir=lib --bindir=bin --includedir=include build -Dtarget_platform=debian -Denable_npu_emul=true -Denable_data_manip=true
29
30 override_dh_auto_build:
31         ninja -C build
32
33 override_dh_auto_test:
34         cd build/tests/unittests && find . -maxdepth 1 -type f -exec basename {} \; |\
35                 xargs -I{} sh -c 'NE_MUTE_STDOUT=1 ./{} --gtest_output="xml:{}.xml"'
36
37         cd build/tests/apptests && find . -maxdepth 1 -type f -exec basename {} \; |\
38                 xargs -I{} sh -c 'NE_MUTE_STDOUT=1 ./{}'
39
40         python3 tests/count_test_cases.py build/tests/unittests
41
42 override_dh_auto_install:
43         DESTDIR=$(CURDIR)/debian/tmp ninja -C build install
44
45 override_dh_install:
46         dh_install --sourcedir=debian/tmp --list-missing
47 # Add --fail-missing option after adding *.install files for all subpackages.