1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 15:33:42 +02:00

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>
This commit is contained in:
Carl-Daniel Hailfinger 2009-06-16 09:31:51 +00:00
parent cbf563cbde
commit 4cb7a96153

View File

@ -80,7 +80,16 @@ dep:
strip: $(PROGRAM) strip: $(PROGRAM)
$(STRIP) $(STRIP_ARGS) $(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... " @echo; printf "Checking for pciutils and zlib... "
@$(shell ( echo "#include <pci/pci.h>"; \ @$(shell ( echo "#include <pci/pci.h>"; \
echo "struct pci_access *pacc;"; \ echo "struct pci_access *pacc;"; \
@ -110,6 +119,6 @@ tarball: export
@rm -rf $(EXPORTDIR)/flashrom-$(VERSION) @rm -rf $(EXPORTDIR)/flashrom-$(VERSION)
@echo Created $(EXPORTDIR)/flashrom-$(VERSION).tar.gz @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 -include .dependencies