[oe-commits] Steve Sakoman : i2c-tools: build & install eepromer tools
git version control
git at git.openembedded.org
Wed Sep 9 15:27:48 UTC 2009
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 35ccef0bc225c7d05c98ebbc63e568aa3856d7ab
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=35ccef0bc225c7d05c98ebbc63e568aa3856d7ab
Author: Steve Sakoman <steve at sakoman.com>
Date: Thu May 14 06:11:26 2009 -0700
i2c-tools: build & install eepromer tools
---
recipes/i2c-tools/files/Module.mk | 72 ++++++++++++++++++++++++++++++++++
recipes/i2c-tools/i2c-tools_3.0.2.bb | 8 +++-
2 files changed, 79 insertions(+), 1 deletions(-)
diff --git a/recipes/i2c-tools/files/Module.mk b/recipes/i2c-tools/files/Module.mk
new file mode 100644
index 0000000..fcaf72f
--- /dev/null
+++ b/recipes/i2c-tools/files/Module.mk
@@ -0,0 +1,72 @@
+# EEPROMER
+#
+# Licensed under the GNU General Public License.
+
+EEPROMER_DIR := eepromer
+
+EEPROMER_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
+ -W -Wundef -Wmissing-prototypes -Iinclude
+
+EEPROMER_TARGETS := eepromer eeprom eeprog
+
+#
+# Programs
+#
+
+$(EEPROMER_DIR)/eepromer: $(EEPROMER_DIR)/eepromer.o
+ $(CC) $(LDFLAGS) -o $@ $^
+
+$(EEPROMER_DIR)/eeprom: $(EEPROMER_DIR)/eeprom.o
+ $(CC) $(LDFLAGS) -o $@ $^
+
+$(EEPROMER_DIR)/eeprog: $(EEPROMER_DIR)/eeprog.o $(EEPROMER_DIR)/24cXX.o
+ $(CC) $(LDFLAGS) -o $@ $^
+
+#
+# Objects
+#
+
+$(EEPROMER_DIR)/eepromer.o: $(EEPROMER_DIR)/eepromer.c
+ $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
+
+$(EEPROMER_DIR)/eeprom.o: $(EEPROMER_DIR)/eeprom.c
+ $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
+
+$(EEPROMER_DIR)/eeprog.o: $(EEPROMER_DIR)/eeprog.c
+ $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
+
+$(EEPROMER_DIR)/24cXX.o: $(EEPROMER_DIR)/24cXX.c
+ $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
+
+#
+# Commands
+#
+
+all-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
+
+strip-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
+ strip $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
+
+clean-eepromer:
+ $(RM) $(addprefix $(EEPROMER_DIR)/,*.o $(EEPROMER_TARGETS))
+
+install-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
+ $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
+ for program in $(EEPROMER_TARGETS) ; do \
+ $(INSTALL_PROGRAM) $(EEPROMER_DIR)/$$program $(DESTDIR)$(sbindir) ; done
+
+uninstall-eepromer:
+ for program in $(EEPROMER_TARGETS) ; do \
+ $(RM) $(DESTDIR)$(sbindir)/$$program ; \
+ $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
+
+all: all-eepromer
+
+strip: strip-eepromer
+
+clean: clean-eepromer
+
+install: install-eepromer
+
+uninstall: uninstall-eepromer
diff --git a/recipes/i2c-tools/i2c-tools_3.0.2.bb b/recipes/i2c-tools/i2c-tools_3.0.2.bb
index c8ea32a..c44af1e 100644
--- a/recipes/i2c-tools/i2c-tools_3.0.2.bb
+++ b/recipes/i2c-tools/i2c-tools_3.0.2.bb
@@ -2,11 +2,17 @@ DESCRIPTION = "Set of i2c tools for linux"
SECTION = "base"
LICENSE = "GPL"
-SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-${PV}.tar.bz2"
+PR = "r1"
+
+SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-${PV}.tar.bz2 \
+ file://Module.mk \
+ "
inherit autotools
do_compile_prepend() {
+ cp ${WORKDIR}/Module.mk ${S}/eepromer/
sed -i 's_/usr/local_/usr_' Makefile
sed -i 's_CC\t:= gcc_CC\t:= ${CC}_' Makefile
+ echo "include eepromer/Module.mk" >> Makefile
}
More information about the Openembedded-commits
mailing list