treewide: drop librt and libpthread packages
[openwrt/staging/jow.git] / package / network / config / ltq-vdsl-vr9-app / Makefile
1 # Copyright (C) 2010 OpenWrt.org
2 # Copyright (C) 2015-2016 Lantiq Beteiligungs GmbH & Co KG.
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=ltq-vdsl-vr9-app
11 PKG_VERSION:=4.17.18.6
12 PKG_RELEASE:=5
13 PKG_BASE_NAME:=dsl_cpe_control
14 PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@OPENWRT
16 PKG_HASH:=da8bb929526a61aea0e153ef524331fcd472a1ebbc6d88ca017735a4f82ece02
17 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
18 PKG_LICENSE:=BSD-2-Clause
19
20 PKG_BUILD_DEPENDS:=ltq-vdsl-vr9
21
22 PKG_FLAGS:=nonshared
23 PKG_FIXUP:=autoreconf
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/ltq-vdsl-vr9-app
28 SECTION:=net
29 CATEGORY:=Network
30 TITLE:=Lantiq VDSL userland tool
31 URL:=http://www.lantiq.com/
32 DEPENDS:=@TARGET_lantiq_xrx200 +ltq-dsl-base +libubox +libubus
33 PROVIDES:=ltq-dsl-app
34 endef
35
36 define Package/ltq-vdsl-vr9-app/description
37 Userland tool needed to control Lantiq VDSL CPE
38 endef
39
40 # ltq-vdsl-vr9-app uses a header provided by the MEI driver which has some
41 # conditionals.
42 #
43 # Define them here with the default values they would get in the MEI driver,
44 # have the same view on both sides.
45 #
46 # If you change them, you need to change them for the ltq-vdsl-vr9-app as well
47 VDSL_APP_CFLAGS = \
48 -DMAX_CLI_PIPES=1 \
49 -DMEI_SUPPORT_DEBUG_STREAMS=1 \
50 -DMEI_SUPPORT_OPTIMIZED_FW_DL=1
51
52 CONFIGURE_ARGS += \
53 --enable-vrx \
54 --enable-vrx-device=vr9 \
55 --enable-driver-include="-I$(STAGING_DIR)/usr/include/drv_vdsl_cpe_api" \
56 --enable-device-driver-include="-I$(STAGING_DIR)/usr/include/vdsl/" \
57 --enable-ifxos \
58 --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
59 --enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \
60 --enable-add-appl-cflags="$(VDSL_APP_CFLAGS)" \
61 --enable-debug \
62 --disable-dti \
63 --with-channels-per-line="1"
64
65 CONFIGURE_ARGS += \
66 --enable-model=full \
67 --enable-dsl-ceoc=no
68 #CONFIGURE_ARGS += --enable-model=lite
69 #CONFIGURE_ARGS += --enable-model=footprint
70 #CONFIGURE_ARGS += --enable-model=typical
71 #CONFIGURE_ARGS += --enable-model=debug
72
73 define Package/ltq-vdsl-vr9-app/install
74 $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl
75 $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/
76 $(INSTALL_BIN) ./files/10_atm.sh $(1)/etc/hotplug.d/dsl
77 $(INSTALL_BIN) ./files/10_ptm.sh $(1)/etc/hotplug.d/dsl
78
79 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin/vdsl_cpe_control
80 $(INSTALL_BIN) ./files/dsl_cpe_pipe.sh $(1)/sbin/
81 endef
82
83 $(eval $(call BuildPackage,ltq-vdsl-vr9-app))