Blob Blame Raw
diff -ur pythia8243.orig/Makefile pythia8243/Makefile
--- pythia8243.orig/Makefile	2019-07-05 11:02:34.000000000 +0200
+++ pythia8243/Makefile	2019-07-05 20:12:08.875161403 +0200
@@ -64,19 +64,19 @@
 endif
 
 # Python.
-PYTHON_COMMON=-I$(PYTHON_INCLUDE) $(CXX_COMMON) -Wl,-rpath,$(PREFIX_LIB)
+PYTHON_COMMON=-I$(PYTHON_INCLUDE) $(CXX_COMMON)
 ifeq ($(PYTHON_USE),true)
   TARGETS+=$(LOCAL_LIB)/_pythia8.so
 endif
 
 # GZIP.
 OBJ_COMMON=-MD $(CXX_COMMON)
-LIB_COMMON=-Wl,-rpath,$(PREFIX_LIB) -ldl
+LIB_COMMON=-ldl
 ifeq ($(GZIP_USE),true)
   PYTHON_COMMON+= -DGZIPSUPPORT -I$(GZIP_INCLUDE)
-  PYTHON_COMMON+= -L$(GZIP_LIB) -Wl,-rpath,$(GZIP_LIB) -lz
+  PYTHON_COMMON+= -L$(GZIP_LIB) -lz
   OBJ_COMMON+= -DGZIPSUPPORT -I$(GZIP_INCLUDE)
-  LIB_COMMON+= -L$(GZIP_LIB) -Wl,-rpath,$(GZIP_LIB) -lz
+  LIB_COMMON+= -L$(GZIP_LIB) -lz
 endif
 
 ################################################################################
@@ -117,23 +117,23 @@
 $(LOCAL_TMP)/LHAPDF%Plugin.o: $(LOCAL_INCLUDE)/Pythia8Plugins/LHAPDF%.h
 	$(CXX) -x c++ $< -o $@ -c -MD -w $(CXX_LHAPDF)
 $(LOCAL_LIB)/libpythia8lhapdf5.so: $(LOCAL_TMP)/LHAPDF5Plugin.o\
-	$(LOCAL_LIB)/libpythia8.a
+	$(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
 	$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED) $(CXX_SONAME)$(notdir $@)\
-	 -L$(LHAPDF5_LIB) -Wl,-rpath,$(LHAPDF5_LIB) -lLHAPDF -lgfortran
+	 -L$(LHAPDF5_LIB) -lLHAPDF -lgfortran
 $(LOCAL_LIB)/libpythia8lhapdf6.so: $(LOCAL_TMP)/LHAPDF6Plugin.o\
-	$(LOCAL_LIB)/libpythia8.a
+	$(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
 	$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED) $(CXX_SONAME)$(notdir $@)\
-	 -L$(LHAPDF6_LIB) -Wl,-rpath,$(LHAPDF6_LIB) -lLHAPDF
+	 -L$(LHAPDF6_LIB) -lLHAPDF
 
 # POWHEG (exclude any executable ending with sh).
 $(LOCAL_TMP)/POWHEGPlugin.o: $(LOCAL_INCLUDE)/Pythia8Plugins/LHAPowheg.h
 	$(CXX) -x c++ $< -o $@ -c -MD -w $(CXX_COMMON)
 $(LOCAL_LIB)/libpythia8powheg%sh.so: $(POWHEG_BIN)/%sh;
 $(LOCAL_LIB)/libpythia8powheg%.so: $(POWHEG_BIN)/% $(LOCAL_TMP)/POWHEGPlugin.o\
-	$(LOCAL_LIB)/libpythia8.a
+	$(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
 	ln -s $< $(notdir $<); $(CXX) $(notdir $<) $(LOCAL_TMP)/POWHEGPlugin.o\
-	 $(LOCAL_LIB)/libpythia8.a -o $@ $(CXX_COMMON) $(CXX_SHARED)\
-	 $(CXX_SONAME)$(notdir $@) -Wl,-rpath,$(POWHEG_BIN); rm $(notdir $<)
+	 $(LOCAL_LIB)/libpythia8$(LIB_SUFFIX) -o $@ $(CXX_COMMON) $(CXX_SHARED)\
+	 $(CXX_SONAME)$(notdir $@); rm $(notdir $<)
 
 # Python (turn off all warnings for readability).
 $(LOCAL_LIB)/pythia8.py: $(LOCAL_INCLUDE)/Pythia8Plugins/PythonWrapper.h
@@ -144,8 +144,7 @@
 	$(LOCAL_LIB)/pythia8.py $(wildcard $(LOCAL_INCLUDE)/*/*.h) |\
 	$(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
 	$(CXX) -x c++ $< -o $@ -w $(PYTHON_COMMON) $(CXX_SHARED)\
-	 -Wl,-undefined,dynamic_lookup -Wno-long-long\
-	 $(CXX_SONAME)$(notdir $@) -L$(LOCAL_LIB) -lpythia8
+	$(CXX_SONAME)$(notdir $@) $(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
 
 # Install (rsync is used for finer control).
 install: all