genode/repos/libports/lib/mk/qemu-usb_include.mk
Sebastian Sumpf a640be9a24 qemu-usb: xHCI model as library
NEC USB3 controller ported from Qemu 2.4.1. See README for more
details.

Issue #1863.
2016-02-05 10:47:43 +01:00

25 lines
722 B
Makefile

ifeq ($(called_from_lib_mk),yes)
QEMU_CONTRIB_DIR := $(call select_from_ports,qemu-usb)/src/lib/qemu
QEMU_EMUL_H := $(REP_DIR)/src/lib/qemu-usb/include/qemu_emul.h
#
# Determine the header files included by the contrib code. For each
# of these header files we create a symlink to 'qemu_emul.h'.
#
GEN_INCLUDES := $(shell grep -rh "^\#include .*" $(QEMU_CONTRIB_DIR) |\
sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" | sort | uniq)
#
# Put Qemu headers in 'GEN_INC' dir
#
GEN_INC := $(shell pwd)/include
GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES))
all: $(GEN_INCLUDES)
$(GEN_INCLUDES):
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)ln -s $(QEMU_EMUL_H) $@
endif