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>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/58622
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
diff --git a/Makefile b/Makefile
index d1d88a4..1140b8c 100644
--- a/Makefile
+++ b/Makefile
@@ -252,6 +252,8 @@
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), NetBSD)
# Needs special `pciutils/pci.h` for older NetBSD packages
override CPPFLAGS += $(shell [ -f /usr/pkg/include/pciutils/pci.h ] && echo -DPCIUTILS_PCI_H)
@@ -960,11 +962,11 @@
$(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
versioninfo:
# Generate versioninfo.inc containing metadata that would not be available in exported sources otherwise.