Fixed cairo makefiles link error when shared option activated under linux.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6485 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
f6d5f48bbe
commit
ed6ac69dd6
2
Makefile
2
Makefile
@ -27,7 +27,7 @@
|
||||
|
||||
include makeinclude
|
||||
|
||||
DIRS = $(IMAGEDIRS) $(CAIRODIR) src fluid test documentation
|
||||
DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid test documentation
|
||||
|
||||
all: makeinclude fltk-config
|
||||
for dir in $(DIRS); do\
|
||||
|
@ -37,48 +37,48 @@ $(CAIROLIBNAME): $(CAIROOBJECTS)
|
||||
$(LIBCOMMAND) $@ $(CAIROOBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libfltk_cairo.so.1.3: $(CAIROOBJECTS) libfltk.so.1.3
|
||||
$(CAIRODSONAME): $(CAIROOBJECTS) ../src/libfltk.so.1.3
|
||||
echo $(DSOCOMMAND) $@ ...
|
||||
$(DSOCOMMAND) $@ $(CAIROOBJECTS) -L. $(IMAGELIBS) -lfltk
|
||||
$(RM) libfltk_cairo.so
|
||||
$(LN) libfltk_cairo.so.1.3 libfltk_cairo.so
|
||||
$(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src $(IMAGELIBS) -lfltk
|
||||
$(RM) ../src/libfltk_cairo.so
|
||||
$(LN) $(CAIRODSONAME) ../src/libfltk_cairo.so
|
||||
|
||||
libfltk_cairo.sl.1.3: $(CAIROOBJECTS) libfltk.sl.1.3
|
||||
../src/libfltk_cairo.sl.1.3: $(CAIROOBJECTS) ../src/libfltk.sl.1.3
|
||||
echo $(DSOCOMMAND) $@ ...
|
||||
$(DSOCOMMAND) $@ $(CAIROOBJECTS) -L. $(IMAGELIBS) -lfltk
|
||||
$(RM) libfltk_cairo.sl
|
||||
$(LN) libfltk_cairo.sl.1.3 libfltk_cairo.sl
|
||||
$(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src $(IMAGELIBS) -lfltk
|
||||
$(RM) ../src/libfltk_cairo.sl
|
||||
$(LN) ../src/libfltk_cairo.sl.1.3 ../src/libfltk_cairo.sl
|
||||
|
||||
libfltk_cairo.1.3.dylib: $(CAIROOBJECTS) libfltk.1.3.dylib
|
||||
../src/libfltk_cairo.1.3.dylib: $(CAIROOBJECTS) ../src/libfltk.1.3.dylib
|
||||
echo $(DSOCOMMAND) $@ ...
|
||||
$(DSOCOMMAND) $@ \
|
||||
-install_name $(libdir)/$@ \
|
||||
-current_version 1.3.0 \
|
||||
-compatibility_version 1.3.0 \
|
||||
$(CAIROOBJECTS) -L. $(LDLIBS) $(IMAGELIBS) -lfltk
|
||||
$(RM) libfltk_cairo.dylib
|
||||
$(LN) libfltk_cairo.1.3.dylib libfltk_cairo.dylib
|
||||
$(CAIROOBJECTS) -L../src $(LDLIBS) $(IMAGELIBS) -lfltk
|
||||
$(RM) ../src/libfltk_cairo.dylib
|
||||
$(LN) ../src/libfltk_cairo.1.3.dylib ../src/libfltk_cairo.dylib
|
||||
|
||||
libfltk_cairo_s.a: $(CAIROOBJECTS)
|
||||
../src/libfltk_cairo_s.a: $(CAIROOBJECTS)
|
||||
echo $(DSOCOMMAND) libfltk_cairo_s.o ...
|
||||
$(DSOCOMMAND) libfltk_cairo_s.o $(CAIROOBJECTS)
|
||||
echo $(LIBCOMMAND) libfltk_cairo_s.a libfltk_cairo_s.o
|
||||
$(DSOCOMMAND) ../src/libfltk_cairo_s.o $(CAIROOBJECTS)
|
||||
echo $(LIBCOMMAND) ../src/libfltk_cairo_s.a ../src/libfltk_cairo_s.o
|
||||
$(RM) $@
|
||||
$(LIBCOMMAND) libfltk_cairo_s.a libfltk_cairo_s.o
|
||||
$(CHMOD) +x libfltk_cairo_s.a
|
||||
$(LIBCOMMAND) ../src/libfltk_cairo_s.a ../src/libfltk_cairo_s.o
|
||||
$(CHMOD) +x ../src/libfltk_cairo_s.a
|
||||
|
||||
|
||||
cygfltknox_cairo-1.3.dll: $(CAIROLIBNAME) cygfltknox-1.3.dll
|
||||
../src/cygfltknox_cairo-1.3.dll: $(CAIROLIBNAME) ../src/cygfltknox-1.3.dll
|
||||
echo $(DSOCOMMAND) $(CAIROLIBNAME) ...
|
||||
$(DSOCOMMAND) $(CAIROLIBNAME) -Wl,--no-whole-archive \
|
||||
-Wl,--out-implib=libfltk_cairo.dll.a \
|
||||
-L. -lfltk $(CAIROLIBS) $(LDLIBS)
|
||||
-Wl,--out-implib=../src/libfltk_cairo.dll.a \
|
||||
-L../src -lfltk $(CAIROLIBS) $(LDLIBS)
|
||||
|
||||
mgwfltknox_cairo-1.3.dll: $(CAIROLIBNAME) mgwfltknox-1.3.dll
|
||||
../src/mgwfltknox_cairo-1.3.dll: $(CAIROLIBNAME) ../src/mgwfltknox-1.3.dll
|
||||
echo $(DSOCOMMAND) $(CAIROLIBNAME) ...
|
||||
$(DSOCOMMAND) $(CAIROLIBNAME) -Wl,--no-whole-archive \
|
||||
-Wl,--out-implib=libfltk_cairo.dll.a \
|
||||
-L. -lfltk $(CAIROLIBS) $(LDLIBS)
|
||||
-Wl,--out-implib=../src/libfltk_cairo.dll.a \
|
||||
-L../src -lfltk $(CAIROLIBS) $(LDLIBS)
|
||||
|
||||
#
|
||||
# Make all of the targets...
|
||||
@ -94,7 +94,7 @@ all: $(CAIROLIBNAME) $(CAIRODSONAME)
|
||||
clean:
|
||||
-$(RM) *.o *.dll.a core.* *~ *.bak *.bck
|
||||
-$(RM) $(CAIROOBJECTS) $(CAIROLIBNAME) $(CAIRODSONAME) \
|
||||
libfltk_cairo.so libfltk_cairo.sl libfltk_cairo.dylib
|
||||
../src/libfltk_cairo.so ../src/libfltk_cairo.sl ../src/libfltk_cairo.dylib
|
||||
|
||||
#
|
||||
# Install everything...
|
||||
@ -105,36 +105,36 @@ install: $(CAIROLIBNAME) $(CAIRODSONAME)
|
||||
-$(INSTALL_DIR) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_LIB) $(CAIROLIBNAME) $(DESTDIR)$(libdir)
|
||||
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo.so.1.3; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo.so.1.3; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.so*;\
|
||||
$(INSTALL_LIB) libfltk_cairo.so.1.3 $(DESTDIR)$(libdir); \
|
||||
$(LN) libfltk_cairo.so.1.3 $(DESTDIR)$(libdir)/libfltk_cairo.so;\
|
||||
$(INSTALL_LIB) ../src/libfltk_cairo.so.1.3 $(DESTDIR)$(libdir); \
|
||||
$(LN) $(DESTDIR)$(libdir)/libfltk_cairo.so.1.3 $(DESTDIR)$(libdir)/libfltk_cairo.so;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo.sl.1.3; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo.sl.1.3; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.sl*;\
|
||||
$(INSTALL_LIB) libfltk_cairo.sl.1.3 $(DESTDIR)$(libdir); \
|
||||
$(LN) libfltk_cairo.sl.1.3 $(DESTDIR)$(libdir)/libfltk_cairo.sl;\
|
||||
$(INSTALL_LIB) ../src/libfltk_cairo.sl.1.3 $(DESTDIR)$(libdir); \
|
||||
$(LN) $(DESTDIR)$(libdir)/libfltk_cairo.sl.1.3 $(DESTDIR)$(libdir)/libfltk_cairo.sl;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo.1.3.dylib; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo.1.3.dylib; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.*dylib;\
|
||||
$(INSTALL_LIB) libfltk_cairo.1.3.dylib $(DESTDIR)$(libdir); \
|
||||
$(LN) libfltk_cairo.1.3.dylib $(DESTDIR)$(libdir)/libfltk_cairo.dylib;\
|
||||
$(INSTALL_LIB) ../src/libfltk_cairo.1.3.dylib $(DESTDIR)$(libdir); \
|
||||
$(LN) $(DESTDIR)$(libdir)/libfltk_cairo.1.3.dylib $(DESTDIR)$(libdir)/libfltk_cairo.dylib;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo_s.a; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo_s.a; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo_s.a;\
|
||||
$(INSTALL_LIB) libfltk_cairo_s.a $(DESTDIR)$(libdir); \
|
||||
$(INSTALL_LIB) ../src/libfltk_cairo_s.a $(DESTDIR)$(libdir); \
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xcygfltknox_cairo-1.3.dll; then\
|
||||
$(RM) $(DESTDIR)$(bindir)/$(CAIRODSONAME); \
|
||||
$(INSTALL_LIB) $(CAIRODSONAME) $(DESTDIR)$(bindir); \
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.dll.a;\
|
||||
$(INSTALL_LIB) libfltk_cairo.dll.a $(DESTDIR)$(libdir); \
|
||||
$(INSTALL_LIB) ../src/libfltk_cairo.dll.a $(DESTDIR)$(libdir); \
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xmgwfltknox_cairo-1.3.dll; then\
|
||||
$(RM) $(DESTDIR)$(bindir)/$(CAIRODSONAME); \
|
||||
$(INSTALL_LIB) $(CAIRODSONAME) $(DESTDIR)$(bindir); \
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.dll.a;\
|
||||
$(INSTALL_LIB) libfltk_cairo.dll.a $(DESTDIR)$(libdir); \
|
||||
$(INSTALL_LIB) ../src/libfltk_cairo.dll.a $(DESTDIR)$(libdir); \
|
||||
fi
|
||||
#
|
||||
# Uninstall everything...
|
||||
@ -145,23 +145,23 @@ uninstall:
|
||||
if test x$(CAIROLIBNAME) != x; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/$(CAIROLIBNAME);\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo.so.1.3; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo.so.1.3; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.so*;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo.sl.1.3; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo.sl.1.3; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.sl*;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo.1.3.dylib; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo.1.3.dylib; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.*dylib;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xlibfltk_cairo_s.a; then\
|
||||
if test x$(CAIRODSONAME) = x../src/libfltk_cairo_s.a; then\
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo_s.a;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xcygfltknox_cairo-1.3.dll; then\
|
||||
if test x$(CAIRODSONAME) = x../src/cygfltknox_cairo-1.3.dll; then\
|
||||
$(RM) $(DESTDIR)$(bindir)/$(CAIRODSONAME); \
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.dll.a;\
|
||||
fi
|
||||
if test x$(CAIRODSONAME) = xmgwfltknox_cairo-1.3.dll; then\
|
||||
if test x$(CAIRODSONAME) = x../src/mgwfltknox_cairo-1.3.dll; then\
|
||||
$(RM) $(DESTDIR)$(bindir)/$(CAIRODSONAME); \
|
||||
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.dll.a;\
|
||||
fi
|
||||
|
20
configure.in
20
configure.in
@ -173,7 +173,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib"
|
||||
GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib"
|
||||
IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib"
|
||||
CAIRODSONAME="libfltk_cairo.$FL_API_VERSION.dylib"
|
||||
CAIRODSONAME="../src/libfltk_cairo.$FL_API_VERSION.dylib"
|
||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -dynamiclib -lc -o"
|
||||
;;
|
||||
|
||||
@ -182,7 +182,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="../src/libfltk_cairo.so.$FL_API_VERSION"
|
||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
|
||||
if test "x$libdir" != "x/usr/lib"; then
|
||||
DSOLINK="-R$libdir"
|
||||
@ -193,7 +193,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms.sl.$FL_API_VERSION"
|
||||
GLDSONAME="libfltk_gl.sl.$FL_API_VERSION"
|
||||
IMGDSONAME="libfltk_images.sl.$FL_API_VERSION"
|
||||
CAIRODSONAME="libfltk_cairo.sl.$FL_API_VERSION"
|
||||
CAIRODSONAME="../src/libfltk_cairo.sl.$FL_API_VERSION"
|
||||
DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o"
|
||||
if test "x$libdir" != "x/usr/lib"; then
|
||||
DSOLINK="-Wl,-rpath,$libdir"
|
||||
@ -204,7 +204,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="../src/libfltk_cairo.so.$FL_API_VERSION"
|
||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
|
||||
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then
|
||||
DSOLINK="-Wl,-rpath,$libdir"
|
||||
@ -215,7 +215,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="../src/libfltk_cairo.so.$FL_API_VERSION"
|
||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
||||
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then
|
||||
DSOLINK="-Wl,-rpath,$libdir"
|
||||
@ -226,7 +226,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="../src/libfltk_cairo.so.$FL_API_VERSION"
|
||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
|
||||
if test "x$libdir" != "x/usr/lib"; then
|
||||
DSOLINK="-Wl,-rpath,$libdir"
|
||||
@ -237,7 +237,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms_s.a"
|
||||
GLDSONAME="libfltk_gl_s.a"
|
||||
IMGDSONAME="libfltk_images_s.a"
|
||||
CAIRODSONAME="libfltk_cairo_s.a"
|
||||
CAIRODSONAME="../src/libfltk_cairo_s.a"
|
||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
|
||||
SHAREDSUFFIX="_s"
|
||||
;;
|
||||
@ -248,13 +248,13 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="mgwfltknox_forms-$FL_API_VERSION.dll"
|
||||
GLDSONAME="mgwfltknox_gl-$FL_API_VERSION.dll"
|
||||
IMGDSONAME="mgwfltknox_images-$FL_API_VERSION.dll"
|
||||
CAIRODSONAME="mgwfltknox_cairo-$FL_API_VERSION.dll"
|
||||
CAIRODSONAME="../src/mgwfltknox_cairo-$FL_API_VERSION.dll"
|
||||
else
|
||||
DSONAME="cygfltknox-$FL_API_VERSION.dll"
|
||||
FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll"
|
||||
GLDSONAME="cygfltknox_gl-$FL_API_VERSION.dll"
|
||||
IMGDSONAME="cygfltknox_images-$FL_API_VERSION.dll"
|
||||
CAIRODSONAME="cygfltknox_cairo-$FL_API_VERSION.dll"
|
||||
CAIRODSONAME="../src/cygfltknox_cairo-$FL_API_VERSION.dll"
|
||||
fi
|
||||
#-----------------------------------------------------------
|
||||
# -Wl,--enable-runtime-pseudo-reloc: See str 1585
|
||||
@ -272,7 +272,7 @@ if test x$enable_shared = xyes; then
|
||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
|
||||
CAIRODSONAME="../src/libfltk_cairo.so.$FL_API_VERSION"
|
||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
||||
;;
|
||||
esac
|
||||
|
@ -1727,7 +1727,7 @@ void Fl_Window::make_current() {
|
||||
current_ = this;
|
||||
fl_clip_region(0);
|
||||
|
||||
#ifdef HAVE_CAIRO
|
||||
#ifdef USE_CAIRO
|
||||
// update the cairo_t context
|
||||
if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user