Build userland headers and add them to the front of the system include path

This fixes a build failure in tools/hv when the installed
linux-libc-dev is too old.
This commit is contained in:
Ben Hutchings 2015-08-13 21:34:08 +02:00
parent 1e84c2a729
commit 094026e778
3 changed files with 14 additions and 1 deletions

View File

@ -142,8 +142,10 @@ class Main(object):
'Makefile',
'arch/*/include/',
'arch/*/Makefile',
'arch/x86/syscalls/',
'arch/x86/lib/memcpy_64.S',
'arch/x86/lib/memset_64.S',
'arch/x86/tools/',
'include/',
'lib/hweight.c',
'lib/rbtree.c',

10
debian/build/Makefile vendored
View File

@ -9,3 +9,13 @@ SUBDIRS = \
OUTDIR = .
include Makefile.inc
# Build userland headers first
unexport VERSION
all-local:
$(MAKE) -C $(top_srcdir) O=$(CURDIR)/out \
INSTALL_HDR_PATH=$(CURDIR) headers_install
all-recursive: all-local
clean-local::
rm -rf generated include out

View File

@ -7,7 +7,8 @@ SHELL = /bin/sh -e
CC = gcc
CXX = g++
CFLAGS ?= -O2 -Wall
CPPFLAGS = -I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR)
CPPFLAGS = -I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR) \
-isystem $(top_srcdir)/debian/build/include
CXXFLAGS = $(CFLAGS)
all: all-local all-recursive