python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / openocd / openocd.mk
blob0d1836573dcc0cbcda2530a145febef415c9dc8b
1 ################################################################################
3 # openocd
5 ################################################################################
7 OPENOCD_VERSION = 0.9.0
8 OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
9 OPENOCD_SITE = http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
11 OPENOCD_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
13 OPENOCD_CONF_OPTS = \
14 --oldincludedir=$(STAGING_DIR)/usr/include \
15 --includedir=$(STAGING_DIR)/usr/include \
16 --disable-doxygen-html \
17 --with-jim-shared=no \
18 --disable-shared \
19 --enable-dummy \
20 --disable-werror
22 # Rely on the Config.in options of each individual adapter selecting
23 # the dependencies they need.
25 OPENOCD_DEPENDENCIES = \
26 $(if $(BR2_PACKAGE_LIBFTDI1),libftdi1) \
27 $(if $(BR2_PACKAGE_LIBUSB),libusb) \
28 $(if $(BR2_PACKAGE_LIBUSB_COMPAT),libusb-compat) \
29 $(if $(BR2_PACKAGE_LIBHID),libhid)
31 # Adapters
32 OPENOCD_CONF_OPTS += \
33 $(if $(BR2_PACKAGE_OPENOCD_FTDI),--enable-ftdi,--disable-ftdi) \
34 $(if $(BR2_PACKAGE_OPENOCD_STLINK),--enable-stlink,--disable-stlink) \
35 $(if $(BR2_PACKAGE_OPENOCD_TI_ICDI),--enable-ti-icdi,--disable-ti-icdi) \
36 $(if $(BR2_PACKAGE_OPENOCD_ULINK),--enable-ulink,--disable-ulink) \
37 $(if $(BR2_PACKAGE_OPENOCD_UBLASTER2),--enable-usb-blaster-2,--disable-usb-blaster-2) \
38 $(if $(BR2_PACKAGE_OPENOCD_JLINK),--enable-jlink,--disable-jlink) \
39 $(if $(BR2_PACKAGE_OPENOCD_OSDBM),--enable-osbdm,--disable-osbdm) \
40 $(if $(BR2_PACKAGE_OPENOCD_OPENDOUS),--enable-opendous,--disable-opendous) \
41 $(if $(BR2_PACKAGE_OPENOCD_AICE),--enable-aice,--disable-aice) \
42 $(if $(BR2_PACKAGE_OPENOCD_VSLLINK),--enable-vsllink,--disable-vsllink) \
43 $(if $(BR2_PACKAGE_OPENOCD_USBPROG),--enable-usbprog,--disable-usbprog) \
44 $(if $(BR2_PACKAGE_OPENOCD_RLINK),--enable-rlink,--disable-rlink) \
45 $(if $(BR2_PACKAGE_OPENOCD_ARMEW),--enable-armjtagew,--disable-armjtagew) \
46 $(if $(BR2_PACKAGE_OPENOCD_CMSIS_DAP),--enable-cmsis-dap,--disable-cmsis-dap) \
47 $(if $(BR2_PACKAGE_OPENOCD_PARPORT),--enable-parport,--disable-parport) \
48 $(if $(BR2_PACKAGE_OPENOCD_FT2XXX),--enable-legacy-ft2232_libftdi,--disable-legacy-ft2232_libftdi) \
49 $(if $(BR2_PACKAGE_OPENOCD_VPI),--enable-jtag_vpi,--disable-jtag_vpi) \
50 $(if $(BR2_PACKAGE_OPENOCD_UBLASTER),--enable-usb_blaster_libftdi,--disable-usb_blaster_libftdi) \
51 $(if $(BR2_PACKAGE_OPENOCD_AMTJT),--enable-amtjtagaccel,--disable-amjtagaccel) \
52 $(if $(BR2_PACKAGE_OPENOCD_ZY1000_MASTER),--enable-zy1000-master,--disable-zy1000-master) \
53 $(if $(BR2_PACKAGE_OPENOCD_ZY1000),--enable-zy1000,--disable-zy1000) \
54 $(if $(BR2_PACKAGE_OPENOCD_EP93XX),--enable-ep93xx,--disable-ep93xx) \
55 $(if $(BR2_PACKAGE_OPENOCD_AT91RM),--enable-at91rm9200,--disable-at91rm9200) \
56 $(if $(BR2_PACKAGE_OPENOCD_BCM2835),--enable-bcm2835gpio,--disable-bcm2835gpio) \
57 $(if $(BR2_PACKAGE_OPENOCD_GW16012),--enable-gw16012,--disable-gw16012) \
58 $(if $(BR2_PACKAGE_OPENOCD_PRESTO),--enable-presto_libftdi,--disable-presto_libftdi) \
59 $(if $(BR2_PACKAGE_OPENOCD_OPENJTAG),--enable-openjtag_ftdi,--disable-openjtag_ftdi) \
60 $(if $(BR2_PACKAGE_OPENOCD_BUSPIRATE),--enable-buspirate,--disable-buspirate) \
61 $(if $(BR2_PACKAGE_OPENOCD_SYSFS),--enable-sysfsgpio,--disable-sysfsgpio)
63 # Enable all configuration options for host build.
65 # Note that deprecated options have been removed. CMSIS_DAP needs
66 # hidapi (currently not included in buildroot) and zy1000 stuff fails
67 # to build, so they've been removed too.
69 HOST_OPENOCD_CONF_OPTS = \
70 --enable-ftdi \
71 --enable-stlink \
72 --enable-ti-icdi \
73 --enable-ulink \
74 --enable-usb-blaster-2 \
75 --enable-jlink \
76 --enable-osbdm \
77 --enable-opendous \
78 --enable-aice \
79 --enable-vsllink \
80 --enable-usbprog \
81 --enable-rlink \
82 --enable-armjtagew \
83 --enable-parport \
84 --enable-jtag_vpi \
85 --enable-usb_blaster_libftdi \
86 --enable-amtjtagaccel \
87 --enable-gw16012 \
88 --enable-presto_libftdi \
89 --enable-openjtag_ftdi \
90 --enable-buspirate \
91 --enable-sysfsgpio \
92 --oldincludedir=$(HOST_DIR)/usr/include \
93 --includedir=$(HOST_DIR)/usr/include \
94 --disable-doxygen-html \
95 --with-jim-shared=no \
96 --disable-shared \
97 --enable-dummy \
98 --disable-werror
100 HOST_OPENOCD_DEPENDENCIES = host-libftdi host-libusb host-libusb-compat
102 # Avoid documentation rebuild. On PowerPC64(le), we patch the
103 # configure script. Due to this, the version.texi files gets
104 # regenerated, and then since it has a newer date than openocd.info,
105 # openocd build system rebuilds the documentation. Unfortunately, this
106 # documentation rebuild fails on old machines. We work around this by
107 # faking the date of the generated version.texi file, to make the
108 # build system believe the documentation doesn't need to be
109 # regenerated.
110 define OPENOCD_FIX_VERSION_TEXI
111 touch -r $(@D)/doc/openocd.info $(@D)/doc/version.texi
112 endef
113 OPENOCD_POST_BUILD_HOOKS += OPENOCD_FIX_VERSION_TEXI
114 HOST_OPENOCD_POST_BUILD_HOOKS += OPENOCD_FIX_VERSION_TEXI
117 $(eval $(autotools-package))
118 $(eval $(host-autotools-package))