summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/Makefile
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-08-15 16:02:52 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-07 18:29:18 +0100
commit746d17434797a7ce9009dae4689f8d08ad5a841a (patch)
tree2c902af5833c19ad56eacaf7f4ed3ac6d014e284 /util/cbfstool/Makefile
parentb1c8f81b25cd77056f653b9a7d5f24e65e40e655 (diff)
downloadcoreboot-746d17434797a7ce9009dae4689f8d08ad5a841a.tar.gz
coreboot-746d17434797a7ce9009dae4689f8d08ad5a841a.tar.bz2
coreboot-746d17434797a7ce9009dae4689f8d08ad5a841a.zip
cbfstool: respect dependencies when building locally
cbfstool was not looking at any dependencies when building by running make in util/cbfstool. By fixing this it's not required to make clean every time you edit a file in there. Change-Id: I544fd54d4b9dd3b277996c21ade56dc086b84800 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/1707 Reviewed-by: Marc Jones <marcj303@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/cbfstool/Makefile')
-rw-r--r--util/cbfstool/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile
index 7d667f894f5d..813ba1b05336 100644
--- a/util/cbfstool/Makefile
+++ b/util/cbfstool/Makefile
@@ -16,6 +16,8 @@ COMMON+=cbfs-mkstage.o cbfs-mkpayload.o cbfstool.o
COMMON:=$(addprefix $(obj)/,$(COMMON))
+all: dep $(BINARY)
+
$(obj)/%.o: %.c
$(HOSTCC) $(CFLAGS) -c -o $@ $<
@@ -37,8 +39,6 @@ $(obj)/%.o: lzma/C/7zip/Common/%.cpp
$(obj)/%.o: lzma/C/Common/%.cpp
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
-all: $(BINARY)
-
clean:
rm -f $(COMMON) $(BINARY)
@@ -47,3 +47,13 @@ tags:
$(obj)/cbfstool:$(COMMON)
$(HOSTCXX) $(LDFLAGS) -o $@ $^
+
+dep:
+ @$(HOSTCC) $(CFLAGS) -MM *.c > .dependencies
+ @$(HOSTCC) $(CFLAGS) -MM lzma/C/7zip/Decompress/*.c >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/7zip/Compress/*/*.cpp >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/7zip/Common/*.cpp >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/Common/*.cpp >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/*.cc >> .dependencies
+
+-include .dependencies