From 64c941f8b86532f0f02eccf072768e672203388e Mon Sep 17 00:00:00 2001 From: Mark Ito Date: Sun, 15 Aug 2021 21:01:08 -0400 Subject: [PATCH 1/2] Adjustments to makefile to work with new cmake system of Diracxx in addition to those from the previous commit from Richard. Adds backward compatibility with old make system. --- GNUmakefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 37c1f75..1e1939e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -18,7 +18,13 @@ ifndef G4SYSTEM endif ifdef DIRACXX_HOME - CPPFLAGS += -I$(DIRACXX_HOME)/include -DUSING_DIRACXX -L$(DIRACXX_HOME)/lib -lDirac + UNAME_P := $(shell uname -p) + DIRACXX_CMAKE := $(shell if [ -d $(DIRACXX_HOME)/$(UNAME_P) ]; then echo true; else echo false; fi) + ifeq ($(DIRACXX_CMAKE), true) + CPPFLAGS += -I$(DIRACXX_HOME)/$(UNAME_P)/include -DUSING_DIRACXX -L$(DIRACXX_HOME)/$(UNAME_P)/lib -lDirac + else + CPPFLAGS += -I$(DIRACXX_HOME) -DUSING_DIRACXX -L$(DIRACXX_HOME) -lDirac + endif endif PYTHON_CONFIG = python-config From bd3002460267d40255b68121e9ae304e5819c745 Mon Sep 17 00:00:00 2001 From: Mark Ito Date: Mon, 16 Aug 2021 13:08:38 -0400 Subject: [PATCH 2/2] Re-adjust to use newly-fixed Diracxx CMakelist. Find include and lib directories under DIRACXX_HOME directory. --- GNUmakefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 1e1939e..f8e92a1 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -18,10 +18,9 @@ ifndef G4SYSTEM endif ifdef DIRACXX_HOME - UNAME_P := $(shell uname -p) - DIRACXX_CMAKE := $(shell if [ -d $(DIRACXX_HOME)/$(UNAME_P) ]; then echo true; else echo false; fi) + DIRACXX_CMAKE := $(shell if [ -f $(DIRACXX_HOME)/CMakeLists.txt ]; then echo true; else echo false; fi) ifeq ($(DIRACXX_CMAKE), true) - CPPFLAGS += -I$(DIRACXX_HOME)/$(UNAME_P)/include -DUSING_DIRACXX -L$(DIRACXX_HOME)/$(UNAME_P)/lib -lDirac + CPPFLAGS += -I$(DIRACXX_HOME)/include -DUSING_DIRACXX -L$(DIRACXX_HOME)/lib -lDirac else CPPFLAGS += -I$(DIRACXX_HOME) -DUSING_DIRACXX -L$(DIRACXX_HOME) -lDirac endif