--- makefile.orig 2022-03-10 09:42:46 UTC +++ makefile @@ -231,7 +231,7 @@ SHLIBBIN=lrs-shared lrsnash-shared # Building (linking) the shared library, and relevant symlinks. ${SHLIB}: ${SHLIBOBJ} - $(CC) -shared -Wl,-soname=$(SONAME) $(SHLIBFLAGS) -o $@ ${SHLIBOBJ} -lgmp + $(CC) -shared -Wl,-soname=$(SONAME) $(SHLIBFLAGS) -o $@ ${SHLIBOBJ} $(LDFLAGS) -lgmp ${SONAME}: ${SHLIB} ln -sf ${SHLIB} ${SONAME} @@ -244,11 +244,11 @@ ${SHLINK}: ${SONAME} all-shared: ${SHLIBBIN} lrs-shared: ${SHLINK} lrs-shared.o - $(CC) $^ -o $@ -L . -llrs + $(CC) $^ -o $@ -L . $(LDFLAGS) -llrs lrsnash-shared: ${SHLINK} lrsnash.c - $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp + $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . $(LDFLAGS) -llrs -lgmp # driver object files @@ -282,19 +282,19 @@ lrslib2-shr.o: lrslib.c lrslib.h # install targets # where to install binaries, libraries, include files prefix ?= /usr/local -INSTALL_INCLUDES=lrslib.h lrsdriver.h lrsgmp.h lrslong.h lrsmp.h lrsrestart.h +INSTALL_INCLUDES=lrslib.h lrsdriver.h lrsgmp.h lrslong.h lrsmp.h lrsnashlib.h lrsrestart.h mplrs.h install: all-shared install-common mkdir -p $(DESTDIR)${prefix}/bin for file in ${SHLIBBIN}; do cp $${file} $(DESTDIR)${prefix}/bin/$$(basename $$file -shared); done mkdir -p $(DESTDIR)${prefix}/lib - install -t $(DESTDIR)${prefix}/lib $(SHLIB) + install $(SHLIB) $(DESTDIR)${prefix}/lib cd $(DESTDIR)${prefix}/lib && ln -sf $(SHLIB) $(SHLINK) cd $(DESTDIR)${prefix}/lib && ln -sf $(SHLIB) $(SONAME) install-common: mkdir -p $(DESTDIR)${prefix}/include/lrslib - install -t $(DESTDIR)${prefix}/include/lrslib ${INSTALL_INCLUDES} + install ${INSTALL_INCLUDES} $(DESTDIR)${prefix}/include/lrslib ###################################################################### clean: