[packages] i2c-tools: update to r6204
[openwrt/svn-archive/archive.git] / utils / lmbench / Makefile
1 #
2 # Copyright (C) 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lmbench
11 PKG_VERSION:=3.0-a9
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=@SF/lmbench/
16 PKG_MD5SUM:=b3351a3294db66a72e2864a199d37cbf
17
18 PKG_BUILD_DEPENDS:=librpc
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/lmbench
23 SECTION:=utils
24 CATEGORY:=Utilities
25 TITLE:=lmbench microbenchmarks
26 URL:=http://sourceforge.net/projects/lmbench
27 MENU:=1
28 endef
29
30 define Package/lmbench/description
31 lmbench is a series of micro benchmarks intended to measure basic operating
32 system and hardware system metrics.
33 endef
34
35 define Package/lmbench/install
36 true
37 endef
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR)/src \
41 CC="$(TARGET_CC)" \
42 AR="$(TARGET_CROSS)ar" \
43 OS="$(ARCH)" \
44 BASE="$(PKG_INSTALL_DIR)" \
45 LDLIBS="-lrpc" \
46 COMPILE="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
47 lmbench install
48 endef
49
50 define PartGen
51 define Package/lmbench-$(subst _,-,$(1))
52 SECTION:=utils
53 CATEGORY:=Utilities
54 TITLE:=$(1) microbenchmark
55 URL:=http://sourceforge.net/projects/lmbench
56 DEPENDS:=lmbench +librpc
57 endef
58 endef
59
60 define PartInstall
61 define Package/lmbench-$(subst _,-,$(1))/install
62 $(INSTALL_DIR) $$(1)/usr/sbin
63 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/$(1) $$(1)/usr/sbin/$(1)
64 endef
65 endef
66
67 LMBENCH_FILES:= \
68 bw_file_rd \
69 bw_mem \
70 bw_mmap_rd \
71 bw_pipe \
72 bw_tcp \
73 bw_unix \
74 cache \
75 disk \
76 enough \
77 flushdisk \
78 hello \
79 lat_cmd \
80 lat_connect \
81 lat_ctx \
82 lat_dram_page \
83 lat_fcntl \
84 lat_fifo \
85 lat_fs \
86 lat_http \
87 lat_mem_rd \
88 lat_mmap \
89 lat_ops \
90 lat_pagefault \
91 lat_pipe \
92 lat_pmake \
93 lat_proc \
94 lat_rand \
95 lat_rpc \
96 lat_select \
97 lat_sem \
98 lat_sig \
99 lat_syscall \
100 lat_tcp \
101 lat_udp \
102 lat_unix \
103 lat_unix_connect \
104 lat_usleep \
105 line \
106 lmdd \
107 lmhttp \
108 loop_o \
109 memsize \
110 mhz \
111 msleep \
112 par_mem \
113 par_ops \
114 stream \
115 timing_o \
116 tlb
117
118 $(foreach file,$(LMBENCH_FILES),$(eval $(call PartGen,$(file))))
119 $(foreach file,$(LMBENCH_FILES),$(eval $(call PartInstall,$(file))))
120
121 $(eval $(call BuildPackage,lmbench))
122 $(foreach file,$(LMBENCH_FILES),$(eval $(call BuildPackage,lmbench-$(subst _,-,$(file)))))