diff --git a/app/Makefile b/app/Makefile index 5d5cbe68..c83b08c3 100755 --- a/app/Makefile +++ b/app/Makefile @@ -13,10 +13,12 @@ CLHEP_LIBS = $(shell clhep-config --libs) CLHEP_INC = $(shell clhep-config --prefix)/include/ ifndef CLHEP_INC # If not defined, normal build. -CLHEP_INC = $(shell clhep-config --prefix)/include/ +CLHEP_INC = $(shell clhep-config --prefix)/include CLHEP_LIBS = $(shell clhep-config --libs) else # github CI passes CLHEP_INC as an environment var, use this to set lib dir -CLHEP_LIBS = $(CLHEP_INC)/../../lib64 + ifndef CLHEP_LIBS # If this is defined here it was set in src/Makefile + CLHEP_LIBS = -L$(CLHEP_INC)/../lib64 + endif endif EDEP_LIBS = -L $(EDEPSIM_LIB) -ledepsim_io $(CLHEP_LIBS) diff --git a/src/Makefile b/src/Makefile index 85d1bbd6..f36ad8d7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,10 +10,10 @@ GEANT4_LIBS = $(shell geant4-config --libs) GEANT4_INC = $(shell geant4-config --prefix)/include/ ifndef CLHEP_INC # If not defined, normal build. -CLHEP_INC = $(shell clhep-config --prefix)/include/ +CLHEP_INC = $(shell clhep-config --prefix)/include CLHEP_LIBS = $(shell clhep-config --libs) else # github CI passes CLHEP_INC as an environment var, use this to set lib dir -CLHEP_LIBS = $(CLHEP_INC)/../../lib64 +CLHEP_LIBS = -L$(CLHEP_INC)/../../lib64 endif EDEP_LIBS = -L $(EDEPSIM_LIB) -ledepsim_io $(CLHEP_LIBS)