imagemagick: bump version to 7.0.3-7 (security)
[buildroot-gz.git] / package / am335x-pru-package / am335x-pru-package.mk
blobd6bffb4f51c29b271b50abcf8a4a4d3f9b438d9d
1 ################################################################################
3 # am335x-pru-package
5 ################################################################################
7 AM335X_PRU_PACKAGE_VERSION = 5f374ad57cc195f28bf5e585c3d446aba6ee7096
8 AM335X_PRU_PACKAGE_SITE = $(call github,beagleboard,am335x_pru_package,$(AM335X_PRU_PACKAGE_VERSION))
9 AM335X_PRU_PACKAGE_LICENSE = BSD-3c
10 AM335X_PRU_PACKAGE_LICENSE_FILES = pru_sw/utils/LICENCE.txt
11 AM335X_PRU_PACKAGE_DEPENDENCIES = host-am335x-pru-package
12 AM335X_PRU_PACKAGE_INSTALL_STAGING = YES
14 # The default 'all' rule builds everything, when we just need the library
15 ifeq ($(BR2_ENABLE_DEBUG),y)
16 AM335X_MAKE_TARGET = debug $(if $(BR2_STATIC_LIBS),,sodebug)
17 else
18 AM335X_MAKE_TARGET = release $(if $(BR2_STATIC_LIBS),,sorelease)
19 endif
21 define AM335X_PRU_PACKAGE_BUILD_CMDS
22 $(TARGET_MAKE_ENV) $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" \
23 -C $(@D)/pru_sw/app_loader/interface $(AM335X_MAKE_TARGET)
24 endef
26 # 'install' installs whatever was built, and our patch removes the dependency
27 # on the release build, so we can use it to install whatever we built above.
28 define AM335X_PRU_PACKAGE_INSTALL_STAGING_CMDS
29 $(TARGET_MAKE_ENV) $(MAKE1) DESTDIR="$(STAGING_DIR)" PREFIX="/usr" \
30 -C $(@D)/pru_sw/app_loader/interface install
31 endef
33 define AM335X_PRU_PACKAGE_INSTALL_TARGET_CMDS
34 $(TARGET_MAKE_ENV) $(MAKE1) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" \
35 -C $(@D)/pru_sw/app_loader/interface install
36 endef
38 # The debug libraries are named differently than the release ones,
39 # so we must provide a symlink to still be able to link with them.
40 ifeq ($(BR2_ENABLE_DEBUG),y)
42 define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC
43 ln -sf libprussdrvd.a $(STAGING_DIR)/usr/lib/libprussdrv.a
44 endef
45 AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC
47 ifeq ($(BR2_STATIC_LIBS),)
49 define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED
50 ln -sf libprussdrvd.so $(STAGING_DIR)/usr/lib/libprussdrv.so
51 endef
52 AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED
54 define AM335X_PRU_PACKAGE_LN_DEBUG_TARGET
55 ln -sf libprussdrvd.so $(TARGET_DIR)/usr/lib/libprussdrv.so
56 endef
57 AM335X_PRU_PACKAGE_POST_INSTALL_TARGET_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_TARGET
59 endif # !STATIC
61 endif # DEBUG
63 define HOST_AM335X_PRU_PACKAGE_BUILD_CMDS
64 cd $(@D)/pru_sw/utils/pasm_source; \
65 $(HOSTCC) -Wall -D_UNIX_ pasm.c pasmpp.c pasmexp.c pasmop.c \
66 pasmdot.c pasmstruct.c pasmmacro.c path_utils.c -o ../pasm
67 endef
69 define HOST_AM335X_PRU_PACKAGE_INSTALL_CMDS
70 $(INSTALL) -m 0755 -D $(@D)/pru_sw/utils/pasm $(HOST_DIR)/usr/bin/pasm
71 endef
73 $(eval $(generic-package))
74 $(eval $(host-generic-package))