summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-06-07 11:08:07 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-06-07 11:08:07 +0000
commite2f015836c8d9749d39d97b2f91adba965dc251a (patch)
treeb415d71f38163bd7e2d37fc735bda49d888eefb2 /Makefile
parent460b282fb49e9e2d99aa623df927fa9775588702 (diff)
downloadflashrom-e2f015836c8d9749d39d97b2f91adba965dc251a.tar.gz
flashrom-e2f015836c8d9749d39d97b2f91adba965dc251a.tar.bz2
flashrom-e2f015836c8d9749d39d97b2f91adba965dc251a.zip
Create dependencies on the fly rather than in a separate step
Corresponding to flashrom svn r1034. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 6 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 474d44ffb..18c5a6b3a 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,7 @@ CLI_OBJS = flashrom.o cli_classic.o cli_output.o print.o
PROGRAMMER_OBJS = udelay.o programmer.o
-all: pciutils features dep $(PROGRAM)
+all: pciutils features $(PROGRAM)
# Set the flashrom version string from the highest revision number
# of the checked out flashrom files.
@@ -255,18 +255,15 @@ $(PROGRAM): $(OBJS)
TAROPTIONS = $(shell LC_ALL=C tar --version|grep -q GNU && echo "--owner=root --group=root")
%.o: %.c .features
- $(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<
+ $(CC) -MMD $(CFLAGS) $(CPPFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<
# Make sure to add all names of generated binaries here.
# This includes all frontends and libflashrom.
clean:
- rm -f $(PROGRAM) $(PROGRAM).exe *.o
+ rm -f $(PROGRAM) $(PROGRAM).exe *.o *.d
distclean: clean
- rm -f .dependencies .features .libdeps
-
-dep:
- @$(CC) $(CPPFLAGS) $(SVNDEF) -MM $(OBJS:.o=.c) > .dependencies
+ rm -f .features .libdeps
strip: $(PROGRAM)
$(STRIP) $(STRIP_ARGS) $(PROGRAM)
@@ -367,6 +364,6 @@ tarball: export
djgpp-dos: clean
make CC=i586-pc-msdosdjgpp-gcc STRIP=i586-pc-msdosdjgpp-strip WARNERROR=no OS_ARCH=DOS
-.PHONY: all clean distclean dep compiler pciutils features export tarball dos
+.PHONY: all clean distclean compiler pciutils features export tarball dos
--include .dependencies
+-include $(OBJS:.o=.d)