omap3-pandora-kernel2: update
[openpandora.oe.git] / recipes / c64_tools / c64-tools.bb
1 DESCRIPTION = "Tools and libraries to support the C64+ DSP found in TI's OMAP3 hardware."
2 HOMEPAGE="http://tkscript.de/c64_tools/"
3 LICENSE = "MIT LGPL GPL"
4
5 PV = "20150208"
6 PR = "r0"
7
8 SRCREV = "679b53e220e61d6faa91d921b3f8c85209a3cd1b"
9
10 SRC_URI = " \
11   git://github.com/bsp2/c64_tools.git;protocol=git;branch=master \
12   file://c64_tools.rules \
13   file://op_dsp_c64.sh \
14   file://99_c64_tools \
15 "
16
17 S = "${WORKDIR}/git"
18
19 TARGET_CFLAGS += "-Wall -I../include "
20 PARALLEL_MAKE = ""
21
22
23 do_compile() {
24   cd ${S}/libc64/
25   # TARGET_SHARED=libc64.so.1
26   oe_runmake -f makefile.linux clean bin
27   ln -fs libc64.so.1 libc64.so
28   cd ${S}/c64_load/
29   touch libc64 # :(
30   oe_runmake -f makefile.linux clean bin
31 }
32
33 do_install() {
34   install -d ${D}${libdir}/
35   install -m 0755 ${S}/libc64/libc64.so.1 ${D}${libdir}/
36   install -d ${D}${sbindir}
37   install -m 0755 ${S}/c64_load/c64_load ${D}${sbindir}/
38
39   # dsp images
40   install -d ${D}${base_libdir}/dsp
41   install -m 0644 ${S}/dsp/core/core.out ${D}${base_libdir}/dsp/
42
43   # script, udev rule, sudoers
44   install -d ${D}${prefix}/pandora/scripts/
45   #install -m 0755 ${S}/scripts/go64.sh ${D}${prefix}/pandora/scripts/op_dsp_c64.sh
46   install -m 0755 ${WORKDIR}/op_dsp_c64.sh ${D}${prefix}/pandora/scripts/
47   install -d ${D}${base_libdir}/udev/rules.d/
48   install -m 0644 ${WORKDIR}/c64_tools.rules ${D}${base_libdir}/udev/rules.d/
49   install -d ${D}${sysconfdir}/sudoers.d/
50   install -m 440 ${WORKDIR}/99_c64_tools ${D}${sysconfdir}/sudoers.d/
51
52   # -dev stuff
53   install -d ${D}${includedir}/c64_tools/include
54   install -d ${D}${includedir}/c64_tools/dsp/libc64_dsp/include
55   install -m 0644 ${S}/include/*.h ${D}${includedir}/c64_tools/include
56   install -m 0644 dsp/libc64_dsp/include/com.h ${D}${includedir}/c64_tools/dsp/libc64_dsp/include/com.h
57   install -m 0644 ${S}/libc64/libc64.a ${D}${libdir}/
58   cp -a ${S}/libc64/libc64.so ${D}${libdir}/
59 }
60
61 FILES_${PN} += " \
62   ${base_libdir}/dsp ${prefix}/pandora/scripts \
63   ${base_libdir}/udev/rules.d ${sysconfdir}/sudoers.d/ \
64 "
65
66 PACKAGE_ARCH = "${MACHINE_ARCH}"
67 COMPATIBLE_MACHINE = "omap3-pandora"