2015-09-09 14:21:19 +00:00
|
|
|
#
|
|
|
|
# Pseudo library to generate a symlink for each header file included by the
|
|
|
|
# contrib code. Each symlink points to the same 'lx_emul.h' file, which
|
|
|
|
# provides our emulation of the Linux kernel API.
|
|
|
|
#
|
|
|
|
|
2015-11-09 12:50:56 +00:00
|
|
|
ifeq ($(called_from_lib_mk),yes)
|
|
|
|
|
2015-09-09 14:21:19 +00:00
|
|
|
LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/framebuffer/intel
|
|
|
|
LX_EMUL_H := $(REP_DIR)/src/drivers/framebuffer/intel/include/lx_emul.h
|
|
|
|
|
2016-03-22 10:04:07 +00:00
|
|
|
GEN_INCLUDES := $(shell grep -rh "^\#include .*" $(LX_CONTRIB_DIR) |\
|
2015-09-09 14:21:19 +00:00
|
|
|
sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" | sort | uniq)
|
|
|
|
|
2015-11-09 12:50:56 +00:00
|
|
|
#
|
|
|
|
# Put Linux headers in 'GEN_INC' dir, since some include use "../../" paths use
|
|
|
|
# three level include hierarchy
|
|
|
|
#
|
|
|
|
GEN_INC := $(shell pwd)/include/include/include
|
|
|
|
GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES))
|
|
|
|
|
2015-09-09 14:21:19 +00:00
|
|
|
all: $(GEN_INCLUDES)
|
|
|
|
|
|
|
|
$(GEN_INCLUDES):
|
|
|
|
$(VERBOSE)mkdir -p $(dir $@)
|
|
|
|
$(VERBOSE)ln -sf $(LX_EMUL_H) $@
|
2015-11-09 12:50:56 +00:00
|
|
|
|
|
|
|
endif
|