mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-04 23:26:57 +00:00
Multiple makefiles: autodetect SCST include directory
It is cumbersome to change SCST_INC_DIR and SCST_DIR in each Makefile before and after a release. Hence modify the Makefiles such that these paths are detected automatically. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4740 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+4
-1
@@ -2,6 +2,9 @@
|
||||
# Makefile for ib_srpt.ko.
|
||||
#
|
||||
|
||||
SCST_INC_DIR := $(shell if [ -e "$$PWD/../scst" ]; \
|
||||
then echo "$$PWD/../scst/include"; \
|
||||
else echo "/usr/local/include/scst"; fi)
|
||||
SCST_SYMVERS_DIR := $(shell if [ -e $$PWD/../scst ]; then \
|
||||
echo $$PWD/../scst/src; \
|
||||
else echo /usr/local/include/scst; fi)
|
||||
@@ -50,7 +53,7 @@ OFED_SRPT_INSTALLED:=$(shell if [ -e $(OFED_SRPT_PATH) ]; then echo true; else e
|
||||
|
||||
all: src/$(MODULE_SYMVERS)
|
||||
$(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/src \
|
||||
PRE_CFLAGS="$(OFED_CFLAGS)" modules
|
||||
PRE_CFLAGS="$(OFED_CFLAGS)" SCST_INC_DIR=$(SCST_INC_DIR) modules
|
||||
|
||||
install: all src/ib_srpt.ko
|
||||
@eval `sed -n 's/#define UTS_RELEASE /KERNELRELEASE=/p' $(KDIR)/include/linux/version.h $(KDIR)/include/linux/utsrelease.h 2>/dev/null`; \
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
SCST_INC_DIR := $(shell d="$(dir $(lastword $(MAKEFILE_LIST)))"; \
|
||||
if [ -e "$$d../../scst" ]; \
|
||||
then echo "$$d../../scst/include"; \
|
||||
else echo "/usr/local/include/scst"; fi)
|
||||
EXTRA_CFLAGS += -I$(SCST_INC_DIR)
|
||||
|
||||
-include $(SUBDIRS)/../build_mode
|
||||
|
||||
Reference in New Issue
Block a user