package 'electric-fence', a memory alloc/dealloc debugger - build shared object which...
authorMirko Vogt <mirko@openwrt.org>
Sun, 8 Apr 2012 19:52:38 +0000 (19:52 +0000)
committerMirko Vogt <mirko@openwrt.org>
Sun, 8 Apr 2012 19:52:38 +0000 (19:52 +0000)
SVN-Revision: 31220

devel/electric-fence/Makefile [new file with mode: 0644]

diff --git a/devel/electric-fence/Makefile b/devel/electric-fence/Makefile
new file mode 100644 (file)
index 0000000..a84dc22
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2008-2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= electric-fence
+PKG_VERSION:=2.1.13
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)-0.1.tar.gz
+PKG_SOURCE_URL:=http://perens.com/FreeSoftware/ElectricFence
+PKG_MD5SUM:=59e4e7817a30aff52d8971ce00e1ad35
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/electric-fence
+  SECTION:=devel
+  CATEGORY:=Development
+  TITLE:=electric-fence
+  URL:=http://perens.com/FreeSoftware/ElectricFence/
+endef
+
+TARGET_CFLAGS += -fPIC
+TARGET_LDFLAGS += -shared -lpthread
+
+define Build/Compile
+       rm -f $(PKG_BUILD_DIR)/libefence.so
+       $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/efence.c -o $(PKG_BUILD_DIR)/efence.o
+       $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/page.c -o $(PKG_BUILD_DIR)/page.o
+       $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/print.c -o $(PKG_BUILD_DIR)/print.o
+       $(TARGET_CC) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/libefence.so $(PKG_BUILD_DIR)/efence.o $(PKG_BUILD_DIR)/page.o $(PKG_BUILD_DIR)/print.o
+endef
+
+define Package/electric-fence/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(INSTALL_BIN) \
+               $(PKG_BUILD_DIR)/libefence.so \
+               $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,electric-fence))