summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2013-07-13 23:21:05 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-07-13 23:21:05 +0000
commit11990da1d3a4ca913ed5b85888a37188c4a621db (patch)
tree5c905e082327d5714b6a09d30ae38e210d610ca9 /Makefile
parent6bf5fe78f1064b56275056b2a90ea4e1c34e42be (diff)
downloadast2050-flashrom-11990da1d3a4ca913ed5b85888a37188c4a621db.zip
ast2050-flashrom-11990da1d3a4ca913ed5b85888a37188c4a621db.tar.gz
Various cross-platform fixes
Improve compilation with libpayload (compiling flashrom.c and linking is still broken): - disable Ponyprog (which enforced serial.c compilation) - make errno available where it is needed Fix internal.c for non-x86 and enable cb parsing on ARM. Fix mingw builds by using its __USE_MINGW_ANSI_STDIO macro and gnu_printf definition for printf format style checking. See http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf This requires inclusion of stdio.h in flash.h. Fix order of libraries in the Makefile: FEATURE_LIBS needs to come *after* PCILIBS in case ZLIB is needed by it. Corresponding to flashrom svn r1697. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 805290c..0cd4e75 100644
--- a/Makefile
+++ b/Makefile
@@ -140,6 +140,9 @@ ifeq ($(TARGET_OS), MinGW)
EXEC_SUFFIX := .exe
# MinGW doesn't have the ffs() function, but we can use gcc's __builtin_ffs().
FLASHROM_CFLAGS += -Dffs=__builtin_ffs
+# Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that
+# for MinGW. See http://sourceforge.net/apps/trac/mingw-w64/wiki/printf%20and%20scanf%20family */
+FLASHROM_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
# libusb-win32/libftdi stuff is usually installed in /usr/local.
CPPFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
@@ -218,6 +221,7 @@ UNSUPPORTED_FEATURES += CONFIG_DUMMY=yes
else
override CONFIG_DUMMY = no
endif
+# Bus Pirate, Serprog and PonyProg are not supported with libpayload (missing serial support).
ifeq ($(CONFIG_BUSPIRATE_SPI), yes)
UNSUPPORTED_FEATURES += CONFIG_BUSPIRATE_SPI=yes
else
@@ -228,6 +232,11 @@ UNSUPPORTED_FEATURES += CONFIG_SERPROG=yes
else
override CONFIG_SERPROG = no
endif
+ifeq ($(CONFIG_PONY_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_PONY_SPI=yes
+else
+override CONFIG_PONY_SPI = no
+endif
# Dediprog and FT2232 are not supported with libpayload (missing libusb support)
ifeq ($(CONFIG_DEDIPROG), yes)
UNSUPPORTED_FEATURES += CONFIG_DEDIPROG=yes
@@ -632,7 +641,7 @@ ifeq ($(ARCH), x86)
endif
$(PROGRAM)$(EXEC_SUFFIX): $(OBJS)
- $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(FEATURE_LIBS) $(LIBS) $(PCILIBS) $(USBLIBS)
+ $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(LIBS) $(PCILIBS) $(FEATURE_LIBS) $(USBLIBS)
libflashrom.a: $(LIBFLASHROM_OBJS)
$(AR) rcs $@ $^
OpenPOWER on IntegriCloud