1
0

Makefile 5.9 KB

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