summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-16 09:31:51 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-16 09:31:51 +0000
commit6cc0f2d4d2b3848aac690c02a84b19a8001ba9fd (patch)
treea067f71503b967b41b76486f635e09b2e9ae2e54 /Makefile
parent6253d81ae44a70cb42a9a2ac69f03370c1d0ddf6 (diff)
downloadflashrom-6cc0f2d4d2b3848aac690c02a84b19a8001ba9fd.zip
flashrom-6cc0f2d4d2b3848aac690c02a84b19a8001ba9fd.tar.gz
Check for a working C compiler
Corresponding to flashrom svn r597. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Joseph Smith <joe@settoplinux.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2ff241d..00a3d93 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,16 @@ dep:
strip: $(PROGRAM)
$(STRIP) $(STRIP_ARGS) $(PROGRAM)
-pciutils:
+compiler:
+ @echo; printf "Checking for a C compiler... "
+ @$(shell ( echo "int main(int argc, char **argv)"; \
+ echo "{ return 0; }"; ) > .test.c )
+ @$(CC) $(CFLAGS) $(LDFLAGS) .test.c -o .test >/dev/null && \
+ echo "found." || ( echo "not found."; \
+ rm -f .test.c .test; exit 1)
+ @rm -f .test.c .test
+
+pciutils: compiler
@echo; printf "Checking for pciutils and zlib... "
@$(shell ( echo "#include <pci/pci.h>"; \
echo "struct pci_access *pacc;"; \
@@ -110,6 +119,6 @@ tarball: export
@rm -rf $(EXPORTDIR)/flashrom-$(VERSION)
@echo Created $(EXPORTDIR)/flashrom-$(VERSION).tar.gz
-.PHONY: all clean distclean dep pciutils export tarball
+.PHONY: all clean distclean dep compiler pciutils export tarball
-include .dependencies
OpenPOWER on IntegriCloud