[PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 91e27d8066e353966b4c35de15f70e278fbcb8ce Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@xxxxxxxxx>
Date: Wed, 3 Oct 2018 23:29:29 +0900
Subject: [PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic

On Ubuntu Bionic, header files of liburcu-dev are installed under
an arch dependent directory such as /usr/include/x86_64-linux-gnu/.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 CodeSamples/Makefile   | 4 +++-
 CodeSamples/depends.mk | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/CodeSamples/Makefile b/CodeSamples/Makefile
index 036fc66..3a96f5c 100644
--- a/CodeSamples/Makefile
+++ b/CodeSamples/Makefile
@@ -39,7 +39,9 @@ endif
 	echo "" >> api.h
 	cat api-pthreads/api-gcc.h >> api.h
 	echo "" >> api.h
-	if test -f /usr/include/urcu-call-rcu.h -o -f /usr/local/include/urcu-call-rcu.h ; \
+	if test -f /usr/include/urcu-call-rcu.h -o \
+		-f /usr/local/include/urcu-call-rcu.h -o \
+		-f /usr/include/$(subdir_ub)/urcu-call-rcu.h ; \
 	then \
 		echo "#define _LGPL_SOURCE" >> api.h; \
 		echo "#include <urcu/rculist.h>" >> api.h; \
diff --git a/CodeSamples/depends.mk b/CodeSamples/depends.mk
index 77a76bf..31a8daf 100644
--- a/CodeSamples/depends.mk
+++ b/CodeSamples/depends.mk
@@ -4,18 +4,25 @@ endif
 
 ifeq ($(arch),i686)
 target := x86
+subdir_ub := i386-linux-gnu
 else ifeq ($(arch),x86_64)
 target := x86
+subdir_ub := x86_64-linux-gnu
 else ifeq ($(arch),ppc64)
 target := ppc64
+subdir_ub :=
 else ifeq ($(arch),ppc64le)
 target := ppc64
+subdir_ub := powerpc64le-linux-gnu
 else ifeq ($(arch),aarch64)
 target := arm64
+subdir_ub := aarch64-linux-gnu
 else ifneq (,$(findstring arm,$(arch)))
 target := arm
+subdir_ub := arm-linux-gnueabihf
 else
 target :=
+subdir_ub :=
 endif
 
 api_depend_common := $(top)/linux/common.h \
-- 
2.7.4




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux