2
0

Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  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. PKG_NAME:=linux-atm
  10. PKG_VERSION:=2.5.2
  11. PKG_RELEASE:=5
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  14. PKG_HASH:=9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a
  15. PKG_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_LICENSE:=GPL-2.0+
  18. PKG_FIXUP:=autoreconf
  19. include $(INCLUDE_DIR)/package.mk
  20. ATM_DEBUG_BINS:=aread awrite atmdiag atmdump atmswitch saaldump \
  21. sonetdiag svc_recv svc_send ttcp_atm
  22. ATM_DEBUG_SBINS:=atmaddr atmloop atmtcp esi atmsigd bus \
  23. ilmid ilmidiag lecs les mpcd zeppelin
  24. ATM_DEBUG_TOOLS:=$(ATM_DEBUG_BINS) $(ATM_DEBUG_SBINS)
  25. define Package/linux-atm
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=Linux ATM library
  29. URL:=http://linux-atm.sourceforge.net/
  30. endef
  31. define Package/linux-atm/description
  32. This package contains a library for accessing the Linux ATM subsystem.
  33. endef
  34. define Package/linux-atm/Default
  35. SECTION:=net
  36. CATEGORY:=Network
  37. DEPENDS:=+linux-atm
  38. URL:=http://linux-atm.sourceforge.net/
  39. SUBMENU:=Linux ATM tools
  40. endef
  41. define Package/atm-tools
  42. $(call Package/linux-atm/Default)
  43. TITLE:=Linux ATM tools
  44. endef
  45. define Package/atm-tools/description
  46. This package contains the Linux ATM tools.
  47. endef
  48. define Package/atm-diagnostics
  49. $(call Package/linux-atm/Default)
  50. TITLE:=Linux ATM Diagnostics
  51. endef
  52. define Package/atm-diagnostics/description
  53. This package contains the Linux ATM diagnostics.
  54. endef
  55. define Package/atm-debug-tools
  56. $(call Package/linux-atm/Default)
  57. TITLE:=Linux ATM debugging tools
  58. endef
  59. define Package/atm-debug-tools/description
  60. This package contains the Linux ATM debugging tools.
  61. endef
  62. define Package/br2684ctl
  63. $(call Package/linux-atm/Default)
  64. TITLE:=ATM Ethernet bridging configuration utility
  65. endef
  66. define Package/br2684ctl/description
  67. Support for AAL5 encapsulation (RFC-1483/RFC-2684) over ATM.
  68. endef
  69. define GenAtmPlugin
  70. define Package/$(1)
  71. $(call Package/linux-atm/Default)
  72. TITLE:=Linux ATM tool $(2)
  73. endef
  74. define Package/$(1)/description
  75. Linux ATM tool $(2).
  76. endef
  77. endef
  78. $(foreach t,$(ATM_DEBUG_TOOLS),$(eval $(call GenAtmPlugin,atm-$(t),$(t))))
  79. define Build/Configure
  80. $(call Build/Configure/Default)
  81. # prevent autoheader invocation
  82. touch $(PKG_BUILD_DIR)/stamp-h.in
  83. endef
  84. unexport PREFIX
  85. define Build/Compile
  86. # src/qgen is built with HOSTCC, which does not really like our LDFLAGS
  87. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/src/qgen \
  88. LDFLAGS="" \
  89. all
  90. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) OBJCOPY=$(TARGET_CROSS)objcopy all
  91. endef
  92. define Build/InstallDev
  93. $(INSTALL_DIR) $(1)/usr
  94. $(CP) \
  95. $(PKG_INSTALL_DIR)/usr/include \
  96. $(PKG_INSTALL_DIR)/usr/lib \
  97. $(1)/usr/
  98. endef
  99. define Package/linux-atm/install
  100. $(INSTALL_DIR) $(1)/usr/lib
  101. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.so* $(1)/usr/lib/
  102. endef
  103. define Package/atm-tools/install
  104. $(INSTALL_DIR) $(1)/usr/sbin/
  105. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmarp{,d} $(1)/usr/sbin/
  106. endef
  107. define BuildAtmPlugin
  108. define Package/$(1)/install
  109. $(INSTALL_DIR) $$(1)/usr/$(3)
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/$(3)/$(2) $$(1)/usr/$(3)
  111. endef
  112. $$(eval $$(call BuildPackage,$(1)))
  113. endef
  114. define Package/atm-debug-tools/install
  115. $(INSTALL_DIR) $(1)/usr/bin/
  116. $(INSTALL_DIR) $(1)/usr/sbin/
  117. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmaddr $(1)/usr/sbin/
  118. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmloop $(1)/usr/sbin/
  119. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmtcp $(1)/usr/sbin/
  120. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/esi $(1)/usr/sbin/
  121. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aread $(1)/usr/bin/
  122. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/awrite $(1)/usr/bin/
  123. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdiag $(1)/usr/bin/
  124. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdump $(1)/usr/bin/
  125. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmsigd $(1)/usr/sbin/
  126. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bus $(1)/usr/sbin/
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ilmid $(1)/usr/sbin/
  128. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ilmidiag $(1)/usr/sbin/
  129. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lecs $(1)/usr/sbin/
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/les $(1)/usr/sbin/
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mpcd $(1)/usr/sbin/
  132. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zeppelin $(1)/usr/sbin/
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmswitch $(1)/usr/bin/
  134. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/saaldump $(1)/usr/bin/
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sonetdiag $(1)/usr/bin/
  136. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svc_recv $(1)/usr/bin/
  137. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svc_send $(1)/usr/bin/
  138. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ttcp_atm $(1)/usr/bin/
  139. endef
  140. define Package/atm-diagnostics/install
  141. $(INSTALL_DIR) $(1)/usr/bin
  142. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aread $(1)/usr/bin/
  143. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/awrite $(1)/usr/bin/
  144. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdiag $(1)/usr/bin/
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdump $(1)/usr/bin/
  146. endef
  147. define Package/br2684ctl/install
  148. $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/hotplug.d/atm $(1)/usr/sbin $(1)/lib/netifd
  149. $(INSTALL_BIN) ./files/br2684-up $(1)/lib/netifd/br2684-up
  150. $(INSTALL_BIN) ./files/br2684ctl $(1)/etc/init.d/
  151. $(INSTALL_DATA) ./files/atm.hotplug $(1)/etc/hotplug.d/atm/00-trigger
  152. $(INSTALL_BIN) \
  153. ./files/br2684ctl_wrap \
  154. $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl \
  155. $(1)/usr/sbin/
  156. endef
  157. $(eval $(call BuildPackage,linux-atm))
  158. $(eval $(call BuildPackage,atm-tools))
  159. $(eval $(call BuildPackage,atm-debug-tools))
  160. $(eval $(call BuildPackage,atm-diagnostics))
  161. $(eval $(call BuildPackage,br2684ctl))
  162. $(foreach t,$(ATM_DEBUG_BINS),$(eval $(call BuildAtmPlugin,atm-$(t),$(t),bin)))
  163. $(foreach t,$(ATM_DEBUG_SBINS),$(eval $(call BuildAtmPlugin,atm-$(t),$(t),sbin)))