Felix Singer has uploaded this change for review.

View Change

Introduce include directory for header files

Introduce the directory `src/include` and move all header files into it.

Change-Id: Iaddd6bbfa0624b166d422f665877f096983bf4cf
Signed-off-by: Felix Singer <felix.singer@secunet.com>
---
M Makefile
M meson.build
R src/include/chipdrivers.h
R src/include/coreboot_tables.h
R src/include/custom_baud.h
R src/include/edi.h
R src/include/ene.h
R src/include/flash.h
R src/include/flashchips.h
R src/include/fmap.h
R src/include/hwaccess.h
R src/include/hwaccess_x86_io.h
R src/include/i2c_helper.h
R src/include/ich_descriptors.h
R src/include/layout.h
R src/include/libflashrom.h
R src/include/programmer.h
R src/include/spi.h
R src/include/usb_device.h
R src/include/writeprotect.h
M util/ich_descriptors_tool/Makefile
M util/ich_descriptors_tool/meson.build
22 files changed, 7 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/22/58622/1
diff --git a/Makefile b/Makefile
index be1d59c..d4faff6 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man
CFLAGS ?= -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings
+CPPFLAGS += -I src/include
EXPORTDIR ?= .
RANLIB ?= ranlib
PKG_CONFIG ?= pkg-config
diff --git a/meson.build b/meson.build
index 85f40ba..589b2ed 100644
--- a/meson.build
+++ b/meson.build
@@ -367,7 +367,7 @@
mandir = join_paths(prefix, get_option('mandir'))

install_headers([
- 'libflashrom.h',
+ 'src/include/libflashrom.h',
],
)

@@ -410,6 +410,7 @@
sources : [
srcs,
],
+ include_directories : include_directories('src/include'),
soversion : lt_current,
version : lt_version,
dependencies : [
@@ -480,6 +481,7 @@
'cli_output.c',
'flashrom.c',
],
+ include_directories : include_directories('src/include'),
dependencies : [
deps,
],
@@ -499,13 +501,13 @@
required: false
)
flashrom_test_dep = declare_dependency(
- include_directories : include_directories('.'),
sources : [
srcs,
'cli_common.c',
'cli_output.c',
'flashrom.c',
],
+ include_directories : include_directories('src/include'),
compile_args : [
'-includestdlib.h',
'-includeunittest_env.h',
diff --git a/chipdrivers.h b/src/include/chipdrivers.h
similarity index 100%
rename from chipdrivers.h
rename to src/include/chipdrivers.h
diff --git a/coreboot_tables.h b/src/include/coreboot_tables.h
similarity index 100%
rename from coreboot_tables.h
rename to src/include/coreboot_tables.h
diff --git a/custom_baud.h b/src/include/custom_baud.h
similarity index 100%
rename from custom_baud.h
rename to src/include/custom_baud.h
diff --git a/edi.h b/src/include/edi.h
similarity index 100%
rename from edi.h
rename to src/include/edi.h
diff --git a/ene.h b/src/include/ene.h
similarity index 100%
rename from ene.h
rename to src/include/ene.h
diff --git a/flash.h b/src/include/flash.h
similarity index 100%
rename from flash.h
rename to src/include/flash.h
diff --git a/flashchips.h b/src/include/flashchips.h
similarity index 100%
rename from flashchips.h
rename to src/include/flashchips.h
diff --git a/fmap.h b/src/include/fmap.h
similarity index 100%
rename from fmap.h
rename to src/include/fmap.h
diff --git a/hwaccess.h b/src/include/hwaccess.h
similarity index 100%
rename from hwaccess.h
rename to src/include/hwaccess.h
diff --git a/hwaccess_x86_io.h b/src/include/hwaccess_x86_io.h
similarity index 100%
rename from hwaccess_x86_io.h
rename to src/include/hwaccess_x86_io.h
diff --git a/i2c_helper.h b/src/include/i2c_helper.h
similarity index 100%
rename from i2c_helper.h
rename to src/include/i2c_helper.h
diff --git a/ich_descriptors.h b/src/include/ich_descriptors.h
similarity index 100%
rename from ich_descriptors.h
rename to src/include/ich_descriptors.h
diff --git a/layout.h b/src/include/layout.h
similarity index 100%
rename from layout.h
rename to src/include/layout.h
diff --git a/libflashrom.h b/src/include/libflashrom.h
similarity index 100%
rename from libflashrom.h
rename to src/include/libflashrom.h
diff --git a/programmer.h b/src/include/programmer.h
similarity index 100%
rename from programmer.h
rename to src/include/programmer.h
diff --git a/spi.h b/src/include/spi.h
similarity index 100%
rename from spi.h
rename to src/include/spi.h
diff --git a/usb_device.h b/src/include/usb_device.h
similarity index 100%
rename from usb_device.h
rename to src/include/usb_device.h
diff --git a/writeprotect.h b/src/include/writeprotect.h
similarity index 100%
rename from writeprotect.h
rename to src/include/writeprotect.h
diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile
index 7f5814f..44f3120 100644
--- a/util/ich_descriptors_tool/Makefile
+++ b/util/ich_descriptors_tool/Makefile
@@ -21,6 +21,7 @@
# If the user has specified custom CFLAGS, all CFLAGS settings below will be
# completely ignored by gnumake.
CFLAGS ?= -Os -Wall -Wshadow
+CPPFLAGS += -I $(SHAREDSRCDIR)/src/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 b5bf09e..9e59309 100644
--- a/util/ich_descriptors_tool/meson.build
+++ b/util/ich_descriptors_tool/meson.build
@@ -4,10 +4,10 @@
'ich_descriptors_tool.c',
'../../ich_descriptors.c',
],
+ include_directories : include_directories('../../src/include'),
dependencies : [
deps,
],
- include_directories : include_directories('../..'),
c_args : [
'-DICH_DESCRIPTORS_FROM_DUMP_ONLY',
],

To view, visit change 58622. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iaddd6bbfa0624b166d422f665877f096983bf4cf
Gerrit-Change-Number: 58622
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger@posteo.net>
Gerrit-MessageType: newchange