diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | include/chipdrivers.h (renamed from chipdrivers.h) | 0 | ||||
-rw-r--r-- | include/coreboot_tables.h (renamed from coreboot_tables.h) | 0 | ||||
-rw-r--r-- | include/custom_baud.h (renamed from custom_baud.h) | 0 | ||||
-rw-r--r-- | include/edi.h (renamed from edi.h) | 0 | ||||
-rw-r--r-- | include/ene.h (renamed from ene.h) | 0 | ||||
-rw-r--r-- | include/flash.h (renamed from flash.h) | 0 | ||||
-rw-r--r-- | include/flashchips.h (renamed from flashchips.h) | 0 | ||||
-rw-r--r-- | include/fmap.h (renamed from fmap.h) | 0 | ||||
-rw-r--r-- | include/hwaccess_physmap.h (renamed from hwaccess_physmap.h) | 0 | ||||
-rw-r--r-- | include/hwaccess_x86_io.h (renamed from hwaccess_x86_io.h) | 0 | ||||
-rw-r--r-- | include/hwaccess_x86_msr.h (renamed from hwaccess_x86_msr.h) | 0 | ||||
-rw-r--r-- | include/i2c_helper.h (renamed from i2c_helper.h) | 0 | ||||
-rw-r--r-- | include/ich_descriptors.h (renamed from ich_descriptors.h) | 0 | ||||
-rw-r--r-- | include/layout.h (renamed from layout.h) | 0 | ||||
-rw-r--r-- | include/libflashrom.h (renamed from libflashrom.h) | 0 | ||||
-rw-r--r-- | include/platform.h (renamed from platform.h) | 0 | ||||
-rw-r--r-- | include/platform/pci.h (renamed from platform/pci.h) | 0 | ||||
-rw-r--r-- | include/programmer.h (renamed from programmer.h) | 0 | ||||
-rw-r--r-- | include/spi.h (renamed from spi.h) | 0 | ||||
-rw-r--r-- | include/usb_device.h (renamed from usb_device.h) | 0 | ||||
-rw-r--r-- | include/writeprotect.h (renamed from writeprotect.h) | 0 | ||||
-rw-r--r-- | meson.build | 10 | ||||
-rw-r--r-- | platform/endian_big.c | 2 | ||||
-rw-r--r-- | platform/endian_little.c | 2 | ||||
-rw-r--r-- | platform/memaccess.c | 2 | ||||
-rw-r--r-- | util/ich_descriptors_tool/Makefile | 1 | ||||
-rw-r--r-- | util/ich_descriptors_tool/meson.build | 2 |
28 files changed, 16 insertions, 9 deletions
@@ -253,6 +253,8 @@ HAS_LINUX_I2C := $(call c_compile_test, Makefile.d/linux_i2c_test.c) HAS_SERIAL := $(strip $(if $(filter $(TARGET_OS), DOS libpayload), no, yes)) EXEC_SUFFIX := $(strip $(if $(filter $(TARGET_OS), DOS MinGW), .exe)) +override CFLAGS += -Iinclude + ifeq ($(TARGET_OS), DOS) # DJGPP has odd uint*_t definitions which cause lots of format string warnings. override CFLAGS += -Wno-format @@ -985,11 +987,11 @@ install: $(PROGRAM)$(EXEC_SUFFIX) $(PROGRAM).8 $(INSTALL) -m 0755 $(PROGRAM)$(EXEC_SUFFIX) $(DESTDIR)$(PREFIX)/sbin $(INSTALL) -m 0644 $(PROGRAM).8 $(DESTDIR)$(MANDIR)/man8 -libinstall: libflashrom.a libflashrom.h +libinstall: libflashrom.a include/libflashrom.h mkdir -p $(DESTDIR)$(PREFIX)/lib $(INSTALL) -m 0644 libflashrom.a $(DESTDIR)$(PREFIX)/lib mkdir -p $(DESTDIR)$(PREFIX)/include - $(INSTALL) -m 0644 libflashrom.h $(DESTDIR)$(PREFIX)/include + $(INSTALL) -m 0644 include/libflashrom.h $(DESTDIR)$(PREFIX)/include _export: $(PROGRAM).8 @rm -rf "$(EXPORTDIR)/flashrom-$(RELEASENAME)" diff --git a/chipdrivers.h b/include/chipdrivers.h index 0695993a..0695993a 100644 --- a/chipdrivers.h +++ b/include/chipdrivers.h diff --git a/coreboot_tables.h b/include/coreboot_tables.h index e1f63a81..e1f63a81 100644 --- a/coreboot_tables.h +++ b/include/coreboot_tables.h diff --git a/custom_baud.h b/include/custom_baud.h index c8b8fc29..c8b8fc29 100644 --- a/custom_baud.h +++ b/include/custom_baud.h diff --git a/flash.h b/include/flash.h index 9493fd21..9493fd21 100644 --- a/flash.h +++ b/include/flash.h diff --git a/flashchips.h b/include/flashchips.h index ba977199..ba977199 100644 --- a/flashchips.h +++ b/include/flashchips.h diff --git a/hwaccess_physmap.h b/include/hwaccess_physmap.h index a0a7e74d..a0a7e74d 100644 --- a/hwaccess_physmap.h +++ b/include/hwaccess_physmap.h diff --git a/hwaccess_x86_io.h b/include/hwaccess_x86_io.h index 31d1e86c..31d1e86c 100644 --- a/hwaccess_x86_io.h +++ b/include/hwaccess_x86_io.h diff --git a/hwaccess_x86_msr.h b/include/hwaccess_x86_msr.h index eda007e8..eda007e8 100644 --- a/hwaccess_x86_msr.h +++ b/include/hwaccess_x86_msr.h diff --git a/i2c_helper.h b/include/i2c_helper.h index 709a748d..709a748d 100644 --- a/i2c_helper.h +++ b/include/i2c_helper.h diff --git a/ich_descriptors.h b/include/ich_descriptors.h index cd5a45cb..cd5a45cb 100644 --- a/ich_descriptors.h +++ b/include/ich_descriptors.h diff --git a/layout.h b/include/layout.h index abbdc22c..abbdc22c 100644 --- a/layout.h +++ b/include/layout.h diff --git a/libflashrom.h b/include/libflashrom.h index 936c9aeb..936c9aeb 100644 --- a/libflashrom.h +++ b/include/libflashrom.h diff --git a/platform.h b/include/platform.h index d15082f0..d15082f0 100644 --- a/platform.h +++ b/include/platform.h diff --git a/platform/pci.h b/include/platform/pci.h index 93bc163b..93bc163b 100644 --- a/platform/pci.h +++ b/include/platform/pci.h diff --git a/programmer.h b/include/programmer.h index 5fb06260..5fb06260 100644 --- a/programmer.h +++ b/include/programmer.h diff --git a/usb_device.h b/include/usb_device.h index 8b7a8010..8b7a8010 100644 --- a/usb_device.h +++ b/include/usb_device.h diff --git a/writeprotect.h b/include/writeprotect.h index e27403dc..e27403dc 100644 --- a/writeprotect.h +++ b/include/writeprotect.h diff --git a/meson.build b/meson.build index f8ca1d3d..32e31df3 100644 --- a/meson.build +++ b/meson.build @@ -379,10 +379,12 @@ libdir = join_paths(prefix, get_option('libdir')) mandir = join_paths(prefix, get_option('mandir')) install_headers([ - 'libflashrom.h', + 'include/libflashrom.h', ], ) +include_dir = include_directories('include') + # core modules needed by both the library and the CLI srcs += '82802ab.c' srcs += 'at45db.c' @@ -423,6 +425,7 @@ flashrom = library( sources : [ srcs, ], + include_directories : include_dir, soversion : lt_current, version : lt_version, dependencies : [ @@ -466,7 +469,7 @@ configure_file( flashrom_dep = declare_dependency( link_with : flashrom, - include_directories : include_directories('.'), + include_directories : include_dir, dependencies : deps ) @@ -493,6 +496,7 @@ executable( 'cli_output.c', 'flashrom.c', ], + include_directories : include_dir, dependencies : [ deps, ], @@ -512,7 +516,7 @@ cmocka_dep = dependency( required: false ) flashrom_test_dep = declare_dependency( - include_directories : include_directories('.'), + include_directories : include_dir, sources : [ srcs, 'cli_common.c', diff --git a/platform/endian_big.c b/platform/endian_big.c index 5d65500d..6541a831 100644 --- a/platform/endian_big.c +++ b/platform/endian_big.c @@ -15,7 +15,7 @@ * GNU General Public License for more details. */ -#include "../platform.h" +#include "platform.h" /* convert cpu native endian to little endian */ ___return_swapped(cpu_to_le, 8) diff --git a/platform/endian_little.c b/platform/endian_little.c index b7c00681..aeb9d573 100644 --- a/platform/endian_little.c +++ b/platform/endian_little.c @@ -15,7 +15,7 @@ * GNU General Public License for more details. */ -#include "../platform.h" +#include "platform.h" /* convert cpu native endian to little endian */ ___return_same(cpu_to_le, 8) diff --git a/platform/memaccess.c b/platform/memaccess.c index 44ef4108..83681212 100644 --- a/platform/memaccess.c +++ b/platform/memaccess.c @@ -15,7 +15,7 @@ * GNU General Public License for more details. */ -#include "../platform.h" +#include "platform.h" /* * macro to return endian aware read function diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile index 7f5814fc..4d971f55 100644 --- a/util/ich_descriptors_tool/Makefile +++ b/util/ich_descriptors_tool/Makefile @@ -21,6 +21,7 @@ SRC = $(wildcard *.c) # If the user has specified custom CFLAGS, all CFLAGS settings below will be # completely ignored by gnumake. CFLAGS ?= -Os -Wall -Wshadow +CFLAGS += -I$(SHAREDSRCDIR)/include # Auto determine HOST_OS and TARGET_OS if they are not set as argument HOST_OS ?= $(shell uname) diff --git a/util/ich_descriptors_tool/meson.build b/util/ich_descriptors_tool/meson.build index b5bf09ec..19097eef 100644 --- a/util/ich_descriptors_tool/meson.build +++ b/util/ich_descriptors_tool/meson.build @@ -7,7 +7,7 @@ executable( dependencies : [ deps, ], - include_directories : include_directories('../..'), + include_directories : include_dir, c_args : [ '-DICH_DESCRIPTORS_FROM_DUMP_ONLY', ], |