|
|
commit 4c012bd7067091fcd44012c8b85fb4519324d0f7
Author: Michael Dickens <mlk@alum.mit.edu>
AuthorDate: Sun Jul 26 08:49:25 2020 -0400
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Thu Aug 20 17:34:57 2020 +0200
Fluid: when linking include LDFLAGS order
LDFLAGS often contains "-L*" flags as provided outside the build to tell the linker where to search for libraries. If these are included -before- the ones used for internal linkage as found in LINKSHARED, and FLTK is already installed on the system, then the already-installed FLTK libraries will be found before those internal to the build. Moving the LDFLAGS after LINKSHARED generally solves this issue. Worst case the move won't hurt linking since all of the flags are still included in the link command.
fluid/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git fluid/Makefile fluid/Makefile
index ff19160..6c14695 100644
--- fluid/Makefile
+++ fluid/Makefile
@@ -55,7 +55,7 @@ all: $(FLUID) fluid$(EXEEXT)
fluid$(EXEEXT): $(OBJECTS) $(LIBNAME) $(FLLIBNAME) \
$(IMGLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDFLAGS) $(LDLIBS)
$(OSX_ONLY) $(RM) -r -f fluid.app/Contents/MacOS
$(OSX_ONLY) mkdir fluid.app/Contents/MacOS
$(OSX_ONLY) $(INSTALL_BIN) fluid fluid.app/Contents/MacOS
@@ -63,7 +63,7 @@ fluid$(EXEEXT): $(OBJECTS) $(LIBNAME) $(FLLIBNAME) \
fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \
../src/$(IMGDSONAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDFLAGS) $(LDLIBS)
clean:
-$(RM) *.o core.* *~ *.bck *.bak
[ Direct Link to Message ] | |
|
| |