diff options
| author | Michael Dickens <mlk@alum.mit.edu> | 2020-07-26 08:49:25 -0400 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-08-20 17:34:57 +0200 |
| commit | 4c012bd7067091fcd44012c8b85fb4519324d0f7 (patch) | |
| tree | 021d1414b9bdecbe63df427216d2764ca5472172 | |
| parent | adc3a29cdcb0fe2aeb69a0fea44158806a6a6c7f (diff) | |
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.
| -rw-r--r-- | fluid/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fluid/Makefile b/fluid/Makefile index ff191601b..6c1469581 100644 --- a/fluid/Makefile +++ b/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 |
