project: move freestanding include headers
This is needed because in libucontext.h we include "libucontext/bits.h". We therefore need to have bits.h in somepath/libucontext/bits.h. In the Makefile, somepath/freestanding/bits.h was copied to the right path but in the meson build system, the include copy happens at the end.pull/27/head
parent
f04d423e63
commit
f3e1b876c7
10
Makefile
10
Makefile
|
@ -23,7 +23,7 @@ EXPORT_UNPREFIXED := yes
|
|||
FREESTANDING := no
|
||||
|
||||
ifeq ($(FREESTANDING),yes)
|
||||
CFLAGS += -DFREESTANDING -isystem arch/${ARCH}/freestanding
|
||||
CFLAGS += -DFREESTANDING
|
||||
EXPORT_UNPREFIXED = no
|
||||
endif
|
||||
|
||||
|
@ -215,13 +215,13 @@ examples/cooperative_threading: examples/cooperative_threading.c ${LIBUCONTEXT_N
|
|||
|
||||
ifeq ($(FREESTANDING),no)
|
||||
|
||||
include/libucontext/bits.h: arch/common/bits.h
|
||||
cp arch/common/bits.h $@
|
||||
include/libucontext/bits.h: arch/common/include/libucontext/bits.h
|
||||
cp $< $@
|
||||
|
||||
else
|
||||
|
||||
include/libucontext/bits.h: arch/${ARCH}/freestanding/bits.h
|
||||
cp arch/${ARCH}/freestanding/bits.h $@
|
||||
include/libucontext/bits.h: arch/${ARCH}/include/libucontext/bits.h
|
||||
cp $< $@
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -70,9 +70,11 @@ if freestanding
|
|||
build_args += '-DFREESTANDING'
|
||||
build_posix = false
|
||||
export_unprefixed = false
|
||||
project_headers += ['arch' / cpu / 'freestanding/bits.h']
|
||||
project_headers += ['arch' / cpu / 'include/libucontext/bits.h']
|
||||
project_includes += ['arch' / cpu / 'include']
|
||||
else
|
||||
project_headers += ['arch/common/bits.h']
|
||||
project_headers += ['arch/common/include/libucontext/bits.h']
|
||||
project_includes += ['arch/common/include']
|
||||
endif
|
||||
|
||||
if export_unprefixed
|
||||
|
|
Loading…
Reference in New Issue