1488570ebSJim Harris# SPDX-License-Identifier: BSD-3-Clause 2a6dbe372Spaul luse# Copyright (C) 2020 Intel Corporation. 335093786SSeth Howell# All rights reserved. 435093786SSeth Howell# 535093786SSeth Howell 64e436e35SKonrad Sztyberrootdir = $(shell dirname $(shell realpath $(word 1,$(MAKEFILE_LIST))))/../.. 74e436e35SKonrad Sztyber 84e436e35SKonrad SztyberSPDK_HEADER_DIR ?= $(rootdir)/include 94e436e35SKonrad SztyberSPDK_LIB_DIR ?= $(rootdir)/build/lib 104e436e35SKonrad SztyberDPDK_LIB_DIR ?= $(rootdir)/dpdk/build/lib 11*6c6c42fcSBen WalkerISAL_LIB_DIR ?= $(rootdir)/isa-l/.libs 12*6c6c42fcSBen WalkerISAL_CRYPTO_LIB_DIR ?= $(rootdir)/isa-l-crypto/.libs 134e436e35SKonrad SztyberVFIO_LIB_DIR ?= $(rootdir)/build/libvfio-user/usr/local/lib 14d14f364eSBen WalkerISAL_LIB_DIR ?= $(rootdir)/isa-l/.libs 15d14f364eSBen WalkerISAL_CRYPTO_LIB_DIR ?= $(rootdir)/isa-l-crypto/.libs 1635093786SSeth Howell 1735093786SSeth Howellifneq ($(SPDK_HEADER_DIR),) 1835093786SSeth HowellCOMMON_CFLAGS+=-I$(SPDK_HEADER_DIR) 1935093786SSeth Howellendif 2035093786SSeth Howell 2135093786SSeth Howellifneq ($(SPDK_LIB_DIR),) 2235093786SSeth HowellCOMMON_CFLAGS+=-L$(SPDK_LIB_DIR) 2335093786SSeth Howellendif 2435093786SSeth Howell 2535093786SSeth Howellifneq ($(DPDK_LIB_DIR),) 2635093786SSeth HowellCOMMON_CFLAGS+=-L$(DPDK_LIB_DIR) 2735093786SSeth Howellendif 28a66fde23STomasz Zawadzki 29*6c6c42fcSBen Walkerifneq ($(ISAL_LIB_DIR),) 30*6c6c42fcSBen WalkerCOMMON_CFLAGS+=-L$(ISAL_LIB_DIR) 31*6c6c42fcSBen Walkerendif 32*6c6c42fcSBen Walker 33*6c6c42fcSBen Walkerifneq ($(ISAL_CRYPTO_LIB_DIR),) 34*6c6c42fcSBen WalkerCOMMON_CFLAGS+=-L$(ISAL_CRYPTO_LIB_DIR) 35*6c6c42fcSBen Walkerendif 36*6c6c42fcSBen Walker 37a66fde23STomasz Zawadzkiifneq ($(VFIO_LIB_DIR),) 38a66fde23STomasz ZawadzkiCOMMON_CFLAGS+=-L$(VFIO_LIB_DIR) 39a66fde23STomasz Zawadzkiendif 40d14f364eSBen Walker 41d14f364eSBen Walkerifneq ($(ISAL_LIB_DIR),) 42d14f364eSBen WalkerCOMMON_CFLAGS+=-L$(ISAL_LIB_DIR) 43d14f364eSBen Walkerendif 44d14f364eSBen Walker 45d14f364eSBen Walkerifneq ($(ISAL_CRYPTO_LIB_DIR),) 46d14f364eSBen WalkerCOMMON_CFLAGS+=-L$(ISAL_CRYPTO_LIB_DIR) 47d14f364eSBen Walkerendif 48d14f364eSBen Walker 4935093786SSeth Howellexport 5035093786SSeth Howell.PHONY: all 5135093786SSeth Howell 528976b47dSEugene Kobyakall: hello_world_bdev_shared_combo nvme_shared accel_shared 5335093786SSeth Howell 5491b30e7aSKonrad Sztyberstatic: hello_world_bdev_static nvme_static 5535093786SSeth Howell 5635093786SSeth Howellhello_world_bdev_shared_combo: passthru_shared 5735093786SSeth Howell $(MAKE) --directory=hello_world bdev_shared_combo 5835093786SSeth Howell 5935093786SSeth Howellhello_world_bdev_shared_iso: passthru_shared 6035093786SSeth Howell $(MAKE) --directory=hello_world bdev_shared_iso 6135093786SSeth Howell 6235093786SSeth Howellhello_world_no_bdev_shared_combo: 6335093786SSeth Howell $(MAKE) --directory=hello_world alone_shared_combo 6435093786SSeth Howell 6535093786SSeth Howellhello_world_no_bdev_shared_iso: 6635093786SSeth Howell $(MAKE) --directory=hello_world alone_shared_iso 6735093786SSeth Howell 6835093786SSeth Howellhello_world_bdev_static: passthru_static 6935093786SSeth Howell $(MAKE) --directory=hello_world bdev_static 7035093786SSeth Howell 7135093786SSeth Howellhello_world_no_bdev_static: 7235093786SSeth Howell $(MAKE) --directory=hello_world alone_static 7335093786SSeth Howell 74d58439d3SEugene Kobyakaccel_module_shared: 75d58439d3SEugene Kobyak $(MAKE) --directory=accel shared_module 768976b47dSEugene Kobyak 77d58439d3SEugene Kobyakaccel_driver_shared: 78d58439d3SEugene Kobyak $(MAKE) --directory=accel shared_driver 79d58439d3SEugene Kobyak 80d58439d3SEugene Kobyakaccel_module_static: 81d58439d3SEugene Kobyak $(MAKE) --directory=accel static_module 82d58439d3SEugene Kobyak 83d58439d3SEugene Kobyakaccel_driver_static: 84d58439d3SEugene Kobyak $(MAKE) --directory=accel static_driver 858976b47dSEugene Kobyak 8635093786SSeth Howellpassthru_shared: 8735093786SSeth Howell $(MAKE) --directory=passthru shared 8835093786SSeth Howell 8935093786SSeth Howellpassthru_static: 9035093786SSeth Howell $(MAKE) --directory=passthru static 9135093786SSeth Howell 9291b30e7aSKonrad Sztybernvme_shared: 9391b30e7aSKonrad Sztyber $(MAKE) --directory=nvme shared 9491b30e7aSKonrad Sztyber 9591b30e7aSKonrad Sztybernvme_static: 9691b30e7aSKonrad Sztyber $(MAKE) --directory=nvme static 9791b30e7aSKonrad Sztyber 9835093786SSeth Howellclean: 9935093786SSeth Howell rm -f ./hello_world/hello_bdev 10035093786SSeth Howell rm -f ./passthru/libpassthru_external.* 10191b30e7aSKonrad Sztyber rm -f ./nvme/*.{so,o} ./nvme/identify 102d58439d3SEugene Kobyak rm -f ./accel/*.{so,o} ./accel/module ./accel/driver 103