2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
17 PKG_HASH
:=9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a
22 PKG_CPE_ID
:=cpe
:/a
:linux-atm
:linux-atm
26 include $(INCLUDE_DIR
)/package.mk
28 ATM_DEBUG_BINS
:=aread awrite atmdiag atmdump atmswitch saaldump \
29 sonetdiag svc_recv svc_send ttcp_atm
30 ATM_DEBUG_SBINS
:=atmaddr atmloop atmtcp esi atmsigd bus \
31 ilmid ilmidiag lecs les mpcd zeppelin
32 ATM_DEBUG_TOOLS
:=$(ATM_DEBUG_BINS
) $(ATM_DEBUG_SBINS
)
34 define Package
/linux-atm
37 TITLE
:=Linux ATM library
38 URL
:=http
://linux-atm.sourceforge.net
/
41 define Package
/linux-atm
/description
42 This package contains a library for accessing the Linux ATM subsystem.
45 define Package
/linux-atm
/Default
49 URL
:=http
://linux-atm.sourceforge.net
/
50 SUBMENU
:=Linux ATM tools
53 define Package
/atm-tools
54 $(call Package
/linux-atm
/Default
)
55 TITLE
:=Linux ATM tools
58 define Package
/atm-tools
/description
59 This package contains the Linux ATM tools.
62 define Package
/atm-diagnostics
63 $(call Package
/linux-atm
/Default
)
64 TITLE
:=Linux ATM Diagnostics
67 define Package
/atm-diagnostics
/description
68 This package contains the Linux ATM diagnostics.
71 define Package
/atm-debug-tools
72 $(call Package
/linux-atm
/Default
)
73 TITLE
:=Linux ATM debugging tools
76 define Package
/atm-debug-tools
/description
77 This package contains the Linux ATM debugging tools.
80 define Package
/br2684ctl
81 $(call Package
/linux-atm
/Default
)
82 TITLE
:=ATM Ethernet bridging configuration utility
85 define Package
/br2684ctl
/description
86 Support for AAL5 encapsulation
(RFC-1483
/RFC-2684
) over ATM.
91 $(call Package
/linux-atm
/Default
)
92 TITLE
:=Linux ATM tool
$(2)
95 define Package
/$(1)/description
100 $(foreach t
,$(ATM_DEBUG_TOOLS
),$(eval
$(call GenAtmPlugin
,atm-
$(t
),$(t
))))
102 TARGET_CFLAGS
+= -I
$(LINUX_DIR
)/user_headers
/include
104 define Build
/Configure
105 $(call Build
/Configure
/Default
)
106 # prevent autoheader invocation
107 touch
$(PKG_BUILD_DIR
)/stamp-h.in
113 # src/qgen is built with HOSTCC, which does not really like our LDFLAGS
114 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/src
/qgen \
117 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) OBJCOPY
=$(TARGET_CROSS
)objcopy
all
120 define Build
/InstallDev
121 $(INSTALL_DIR
) $(1)/usr
123 $(PKG_INSTALL_DIR
)/usr
/include \
124 $(PKG_INSTALL_DIR
)/usr
/lib \
128 define Package
/linux-atm
/install
129 $(INSTALL_DIR
) $(1)/usr
/lib
130 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libatm.so
* $(1)/usr
/lib
/
133 define Package
/atm-tools
/install
134 $(INSTALL_DIR
) $(1)/usr
/sbin
/
135 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/atmarp
{,d
} $(1)/usr
/sbin
/
139 define BuildAtmPlugin
140 define Package
/$(1)/install
141 $(INSTALL_DIR
) $$(1)/usr
/$(3)
142 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/$(3)/$(2) $$(1)/usr
/$(3)
145 $$(eval
$$(call BuildPackage
,$(1)))
148 define Package
/atm-debug-tools
/install
149 $(INSTALL_DIR
) $(1)/usr
/bin
/
150 $(INSTALL_DIR
) $(1)/usr
/sbin
/
151 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/atmaddr
$(1)/usr
/sbin
/
152 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/atmloop
$(1)/usr
/sbin
/
153 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/atmtcp
$(1)/usr
/sbin
/
154 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/esi
$(1)/usr
/sbin
/
155 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/aread
$(1)/usr
/bin
/
156 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/awrite
$(1)/usr
/bin
/
157 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/atmdiag
$(1)/usr
/bin
/
158 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/atmdump
$(1)/usr
/bin
/
159 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/atmsigd
$(1)/usr
/sbin
/
160 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/bus
$(1)/usr
/sbin
/
161 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ilmid
$(1)/usr
/sbin
/
162 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ilmidiag
$(1)/usr
/sbin
/
163 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/lecs
$(1)/usr
/sbin
/
164 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/les
$(1)/usr
/sbin
/
165 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/mpcd
$(1)/usr
/sbin
/
166 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/zeppelin
$(1)/usr
/sbin
/
167 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/atmswitch
$(1)/usr
/bin
/
168 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/saaldump
$(1)/usr
/bin
/
169 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sonetdiag
$(1)/usr
/bin
/
170 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/svc_recv
$(1)/usr
/bin
/
171 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/svc_send
$(1)/usr
/bin
/
172 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ttcp_atm
$(1)/usr
/bin
/
175 define Package
/atm-diagnostics
/install
176 $(INSTALL_DIR
) $(1)/usr
/bin
177 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/aread
$(1)/usr
/bin
/
178 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/awrite
$(1)/usr
/bin
/
179 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/atmdiag
$(1)/usr
/bin
/
180 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/atmdump
$(1)/usr
/bin
/
183 define Package
/br2684ctl
/install
184 $(INSTALL_DIR
) $(1)/etc
/init.d
$(1)/etc
/hotplug.d
/atm
$(1)/usr
/sbin
$(1)/lib
/netifd
185 $(INSTALL_BIN
) .
/files
/br2684-up
$(1)/lib
/netifd
/br2684-up
186 $(INSTALL_BIN
) .
/files
/br2684ctl
$(1)/etc
/init.d
/
187 $(INSTALL_CONF
) .
/files
/atm.hotplug
$(1)/etc
/hotplug.d
/atm
/00-trigger
189 .
/files
/br2684ctl_wrap \
190 $(PKG_INSTALL_DIR
)/usr
/sbin
/br2684ctl \
194 $(eval
$(call BuildPackage
,linux-atm
))
195 $(eval
$(call BuildPackage
,atm-tools
))
196 $(eval
$(call BuildPackage
,atm-debug-tools
))
197 $(eval
$(call BuildPackage
,atm-diagnostics
))
198 $(eval
$(call BuildPackage
,br2684ctl
))
199 $(foreach t
,$(ATM_DEBUG_BINS
),$(eval
$(call BuildAtmPlugin
,atm-
$(t
),$(t
),bin
)))
200 $(foreach t
,$(ATM_DEBUG_SBINS
),$(eval
$(call BuildAtmPlugin
,atm-
$(t
),$(t
),sbin
)))