mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00
Introduce an include
directory for header files
Move all header files to the new `include` directory. Adapt include directives and build systems to the new directory. Change-Id: Iaddd6bbfa0624b166d422f665877f096983bf4cf Signed-off-by: Felix Singer <felix.singer@secunet.com> Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58622 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
parent
bfbec45de0
commit
87d7b110d6
6
Makefile
6
Makefile
@ -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)"
|
||||
|
10
meson.build
10
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',
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -15,7 +15,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "../platform.h"
|
||||
#include "platform.h"
|
||||
|
||||
/*
|
||||
* macro to return endian aware read function
|
||||
|
@ -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)
|
||||
|
@ -7,7 +7,7 @@ executable(
|
||||
dependencies : [
|
||||
deps,
|
||||
],
|
||||
include_directories : include_directories('../..'),
|
||||
include_directories : include_dir,
|
||||
c_args : [
|
||||
'-DICH_DESCRIPTORS_FROM_DUMP_ONLY',
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user