diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-06-16 09:31:51 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-06-16 09:31:51 +0000 |
commit | b2754bf012a90e09f6d60cad577ac5271f5ebdfa (patch) | |
tree | a067f71503b967b41b76486f635e09b2e9ae2e54 /Makefile | |
parent | 36a4bafe1fcccdf2695ece4844e843a33f719478 (diff) | |
download | flashrom-b2754bf012a90e09f6d60cad577ac5271f5ebdfa.tar.gz |
Check for a working C compiler.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Joseph Smith <joe@settoplinux.org>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@597 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 |