[flashrom] [PATCH] Makefile OS-dependent fixes

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Jun 30 02:19:49 CEST 2012


Move Mac OS X IOKit/DirectHW availability checks from compiler check to
pciutils check.

Add DOS libpci includes only if a PCI-based programmer was requested.

Cosmetic fixes (additional newlines) for consistency.

This should fix "Checking for a C compiler...not found" if DirectHW was
not installed on Mac OS X.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: flashrom-makefile_pci_osx_dos_fixes/Makefile
===================================================================
--- flashrom-makefile_pci_osx_dos_fixes/Makefile	(Revision 1547)
+++ flashrom-makefile_pci_osx_dos_fixes/Makefile	(Arbeitskopie)
@@ -55,20 +55,22 @@
 
 ifeq ($(TARGET_OS), Darwin)
 CPPFLAGS += -I/opt/local/include -I/usr/local/include
-# DirectHW framework can be found in the DirectHW library.
-LDFLAGS += -framework IOKit -framework DirectHW -L/opt/local/lib -L/usr/local/lib
+LDFLAGS += -L/opt/local/lib -L/usr/local/lib
 endif
+
 ifeq ($(TARGET_OS), FreeBSD)
 CPPFLAGS += -I/usr/local/include
 LDFLAGS += -L/usr/local/lib
 endif
+
 ifeq ($(TARGET_OS), OpenBSD)
 CPPFLAGS += -I/usr/local/include
 LDFLAGS += -L/usr/local/lib
 endif
+
 ifeq ($(TARGET_OS), DOS)
 EXEC_SUFFIX := .exe
-CPPFLAGS += -I../libgetopt -I../libpci/include
+CPPFLAGS += -I../libgetopt
 # DJGPP has odd uint*_t definitions which cause lots of format string warnings.
 CPPFLAGS += -Wno-format
 # FIXME Check if we can achieve the same effect with -L../libgetopt -lgetopt
@@ -531,10 +533,19 @@
 ifeq ($(TARGET_OS), OpenBSD)
 # For (i386|amd64)_iopl(2).
 LIBS += -l$(shell uname -m)
+else
+ifeq ($(TARGET_OS), Darwin)
+# DirectHW framework can be found in the DirectHW library.
+LIBS += -framework IOKit -framework DirectHW 
+else
+ifeq ($(TARGET_OS), DOS)
+CPPFLAGS += -I../libpci/include
 endif
 endif
 endif
 endif
+endif
+endif
 
 ifeq ($(CONFIG_PRINT_WIKI), yes)
 FEATURE_CFLAGS += -D'CONFIG_PRINT_WIKI=1'


-- 
http://www.hailfinger.org/





More information about the flashrom mailing list