From 2dc7307487d8c66fcd7b78098866ba4d6e2bd0ab Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sat, 29 Sep 2007 21:06:44 +0000 Subject: [PATCH] Rename module Makefiles from Makefile to Module.mk. They can't be used as standalone makefiles. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@4906 7894878c-1315-0410-8ee3-d5d059ff63e0 --- Makefile | 4 +-- eeprom/Makefile | 27 ------------------ eeprom/Module.mk | 27 ++++++++++++++++++ tools/Makefile | 84 -------------------------------------------------------- tools/Module.mk | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 eeprom/Makefile create mode 100644 eeprom/Module.mk delete mode 100644 tools/Makefile create mode 100644 tools/Module.mk diff --git a/Makefile b/Makefile index 392c0df..99ca82b 100644 --- a/Makefile +++ b/Makefile @@ -28,5 +28,5 @@ CFLAGS += -O2 all: -include eeprom/Makefile -include tools/Makefile +include eeprom/Module.mk +include tools/Module.mk diff --git a/eeprom/Makefile b/eeprom/Makefile deleted file mode 100644 index 49c2658..0000000 --- a/eeprom/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# EEPROM decoding scripts for the Linux eeprom driver -# -# Copyright (C) 2007 Jean Delvare -# -# Licensed under the GNU Public License. - -EEPROM_DIR := eeprom - -EEPROM_TARGETS := decode-dimms.pl decode-vaio.pl ddcmon decode-edid.pl \ - decode-xeon.pl - -# -# Commands -# - -install-eeprom: $(addprefix $(EEPROM_DIR)/,$(EEPROM_TARGETS)) - $(INSTALL_DIR) $(DESTDIR)$(bindir) - for program in $(EEPROM_TARGETS) ; do \ - $(INSTALL_PROGRAM) $(EEPROM_DIR)/$$program $(DESTDIR)$(bindir) ; done - -uninstall-eeprom: - for program in $(EEPROM_TARGETS) ; do \ - $(RM) $(DESTDIR)$(bindir)/$$program ; done - -install: install-eeprom - -uninstall: uninstall-eeprom diff --git a/eeprom/Module.mk b/eeprom/Module.mk new file mode 100644 index 0000000..49c2658 --- /dev/null +++ b/eeprom/Module.mk @@ -0,0 +1,27 @@ +# EEPROM decoding scripts for the Linux eeprom driver +# +# Copyright (C) 2007 Jean Delvare +# +# Licensed under the GNU Public License. + +EEPROM_DIR := eeprom + +EEPROM_TARGETS := decode-dimms.pl decode-vaio.pl ddcmon decode-edid.pl \ + decode-xeon.pl + +# +# Commands +# + +install-eeprom: $(addprefix $(EEPROM_DIR)/,$(EEPROM_TARGETS)) + $(INSTALL_DIR) $(DESTDIR)$(bindir) + for program in $(EEPROM_TARGETS) ; do \ + $(INSTALL_PROGRAM) $(EEPROM_DIR)/$$program $(DESTDIR)$(bindir) ; done + +uninstall-eeprom: + for program in $(EEPROM_TARGETS) ; do \ + $(RM) $(DESTDIR)$(bindir)/$$program ; done + +install: install-eeprom + +uninstall: uninstall-eeprom diff --git a/tools/Makefile b/tools/Makefile deleted file mode 100644 index 290e170..0000000 --- a/tools/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# I2C tools for Linux -# -# Copyright (C) 2007 Jean Delvare -# -# Licensed under the GNU Public License. - -TOOLS_DIR := tools - -TOOLS_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ - -Wcast-align -Wwrite-strings -Wnested-externs -Winline \ - -W -Wundef -Wmissing-prototypes -I../include - -TOOLS_TARGETS := i2cdetect i2cdump i2cset i2cget - -# -# Programs -# - -$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o - $(CC) $(LDFLAGS) -o $@ $^ - -$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o - $(CC) $(LDFLAGS) -o $@ $^ - -$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o - $(CC) $(LDFLAGS) -o $@ $^ - -$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o - $(CC) $(LDFLAGS) -o $@ $^ - -# -# Objects -# - -$(TOOLS_DIR)/i2cdetect.o: $(TOOLS_DIR)/i2cdetect.c $(TOOLS_DIR)/i2cbusses.h - $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ - -$(TOOLS_DIR)/i2cdump.o: $(TOOLS_DIR)/i2cdump.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h - $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ - -$(TOOLS_DIR)/i2cset.o: $(TOOLS_DIR)/i2cset.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h - $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ - -$(TOOLS_DIR)/i2cget.o: $(TOOLS_DIR)/i2cget.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h - $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ - -$(TOOLS_DIR)/i2cbusses.o: $(TOOLS_DIR)/i2cbusses.c $(TOOLS_DIR)/i2cbusses.h - $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ - -$(TOOLS_DIR)/util.o: $(TOOLS_DIR)/util.c $(TOOLS_DIR)/util.h - $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ - -# -# Commands -# - -all-tools: $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) - -strip-tools: $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) - strip $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) - -clean-tools: - $(RM) $(addprefix $(TOOLS_DIR)/,*.o $(TOOLS_TARGETS)) - -install-tools: $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) - $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir) - for program in $(TOOLS_TARGETS) ; do \ - $(INSTALL_PROGRAM) $(TOOLS_DIR)/$$program $(DESTDIR)$(sbindir) ; \ - $(INSTALL_DATA) $(TOOLS_DIR)/$$program.8 $(DESTDIR)$(man8dir) ; done - -uninstall-tools: - for program in $(TOOLS_TARGETS) ; do \ - $(RM) $(DESTDIR)$(sbindir)/$$program ; \ - $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done - -all: all-tools - -strip: strip-tools - -clean: clean-tools - -install: install-tools - -uninstall: uninstall-tools diff --git a/tools/Module.mk b/tools/Module.mk new file mode 100644 index 0000000..290e170 --- /dev/null +++ b/tools/Module.mk @@ -0,0 +1,84 @@ +# I2C tools for Linux +# +# Copyright (C) 2007 Jean Delvare +# +# Licensed under the GNU Public License. + +TOOLS_DIR := tools + +TOOLS_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ + -Wcast-align -Wwrite-strings -Wnested-externs -Winline \ + -W -Wundef -Wmissing-prototypes -I../include + +TOOLS_TARGETS := i2cdetect i2cdump i2cset i2cget + +# +# Programs +# + +$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o + $(CC) $(LDFLAGS) -o $@ $^ + +$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o + $(CC) $(LDFLAGS) -o $@ $^ + +$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o + $(CC) $(LDFLAGS) -o $@ $^ + +$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o + $(CC) $(LDFLAGS) -o $@ $^ + +# +# Objects +# + +$(TOOLS_DIR)/i2cdetect.o: $(TOOLS_DIR)/i2cdetect.c $(TOOLS_DIR)/i2cbusses.h + $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ + +$(TOOLS_DIR)/i2cdump.o: $(TOOLS_DIR)/i2cdump.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h + $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ + +$(TOOLS_DIR)/i2cset.o: $(TOOLS_DIR)/i2cset.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h + $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ + +$(TOOLS_DIR)/i2cget.o: $(TOOLS_DIR)/i2cget.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h + $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ + +$(TOOLS_DIR)/i2cbusses.o: $(TOOLS_DIR)/i2cbusses.c $(TOOLS_DIR)/i2cbusses.h + $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ + +$(TOOLS_DIR)/util.o: $(TOOLS_DIR)/util.c $(TOOLS_DIR)/util.h + $(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@ + +# +# Commands +# + +all-tools: $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) + +strip-tools: $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) + strip $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) + +clean-tools: + $(RM) $(addprefix $(TOOLS_DIR)/,*.o $(TOOLS_TARGETS)) + +install-tools: $(addprefix $(TOOLS_DIR)/,$(TOOLS_TARGETS)) + $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir) + for program in $(TOOLS_TARGETS) ; do \ + $(INSTALL_PROGRAM) $(TOOLS_DIR)/$$program $(DESTDIR)$(sbindir) ; \ + $(INSTALL_DATA) $(TOOLS_DIR)/$$program.8 $(DESTDIR)$(man8dir) ; done + +uninstall-tools: + for program in $(TOOLS_TARGETS) ; do \ + $(RM) $(DESTDIR)$(sbindir)/$$program ; \ + $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done + +all: all-tools + +strip: strip-tools + +clean: clean-tools + +install: install-tools + +uninstall: uninstall-tools