fltk/cairo/Makefile
Albrecht Schlosser 1a69ba5ae9 Update configure and makeinclude.in to get rid of version numbers in Makefiles.
configure is used to set all needed version numbers in makeinclude.
makeinclude is included in Makefile's and the version numbers are used
to build the correct shared libs.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-07 18:37:56 +00:00

175 lines
5.8 KiB
Makefile

#
# "$Id: Makefile 5667 2007-02-07 02:35:44Z mike $"
#
# CAIRO library makefile for the Fast Light Toolkit (FLTK).
#
# Copyright 1997-2009 by Easy Software Products.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
# file is missing or damaged, see the license at:
#
# http://www.fltk.org/COPYING.php
#
# Please report all bugs and problems on the following page:
#
# http://www.fltk.org/str.php
#
# Note: see ../configure.in and/or ../makeinclude for definition of
# FL_VERSION (x.y.z), FL_ABI_VERSION (x.y.0), and FL_API_VERSION (x.y)
FLTKFLAGS = -DFL_LIBRARY
include ../makeinclude
#
# Object files...
#
CAIROCPPFILES = Fl_Cairo.cxx
CAIROOBJECTS = $(CAIROCPPFILES:.cxx=.o)
#
# Make all of the targets...
#
all: $(CAIROLIBNAME) $(CAIRODSONAME)
$(CAIROLIBNAME): $(CAIROOBJECTS)
echo $(LIBCOMMAND) $@ ...
$(RM) $@
$(LIBCOMMAND) $@ $(CAIROOBJECTS)
$(RANLIB) $@
libfltk_cairo.so.$(FL_API_VERSION): $(CAIROOBJECTS) ../src/libfltk.so.$(FL_API_VERSION)
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src -lfltk
$(RM) libfltk_cairo.so
$(LN) $(CAIRODSONAME) libfltk_cairo.so
libfltk_cairo.sl.$(FL_API_VERSION): $(CAIROOBJECTS) ../src/libfltk.sl.$(FL_API_VERSION)
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src -lfltk
$(RM) libfltk_cairo.sl
$(LN) libfltk_cairo.sl.$(FL_API_VERSION) libfltk_cairo.sl
libfltk_cairo.$(FL_API_VERSION).dylib: $(CAIROOBJECTS) ../src/libfltk.$(FL_API_VERSION).dylib
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ \
-install_name $(libdir)/$@ \
-current_version $(FL_VERSION) \
-compatibility_version $(FL_ABI_VERSION) \
$(CAIROOBJECTS) -L../src $(LDLIBS) $(CAIROLIBS) -lfltk
$(RM) libfltk_cairo.dylib
$(LN) libfltk_cairo.$(FL_API_VERSION).dylib libfltk_cairo.dylib
libfltk_cairo_s.a: $(CAIROOBJECTS)
echo $(DSOCOMMAND) libfltk_cairo_s.o ...
$(DSOCOMMAND) libfltk_cairo_s.o $(CAIROOBJECTS)
echo $(LIBCOMMAND) libfltk_cairo_s.a src/libfltk_cairo_s.o
$(RM) $@
$(LIBCOMMAND) src/libfltk_cairo_s.a src/libfltk_cairo_s.o
$(CHMOD) +x src/libfltk_cairo_s.a
cygfltknox_cairo-$(FL_API_VERSION).dll: $(CAIROLIBNAME) ../src/cygfltknox-$(FL_API_VERSION).dll
echo $(DSOCOMMAND) $(CAIROLIBNAME) ...
$(DSOCOMMAND) $(CAIROLIBNAME) -Wl,--no-whole-archive \
-Wl,--out-implib=libfltk_cairo.dll.a \
-L../src -lfltk $(CAIROLIBS) $(LDLIBS)
mgwfltknox_cairo-$(FL_API_VERSION).dll: $(CAIROLIBNAME) ../src/mgwfltknox-$(FL_API_VERSION).dll
echo $(DSOCOMMAND) $(CAIROLIBNAME) ...
$(DSOCOMMAND) $(CAIROLIBNAME) -Wl,--no-whole-archive \
-Wl,--out-implib=libfltk_cairo.dll.a \
-L../src -lfltk $(CAIROLIBS) $(LDLIBS)
#
# Clean all of the targets and object files...
#
clean:
-$(RM) *.o *.dll.a core.* *~ *.bak *.bck
-$(RM) $(CAIROOBJECTS) $(CAIROLIBNAME) $(CAIRODSONAME) \
libfltk_cairo.so src/libfltk_cairo.sl src/libfltk_cairo.dylib
#
# Install everything...
#
install: $(CAIROLIBNAME) $(CAIRODSONAME)
echo "Installing libfltk_cairo$(LIBEXT) in $(libdir)..."
-$(INSTALL_DIR) $(DESTDIR)$(libdir)
$(INSTALL_LIB) $(CAIROLIBNAME) $(DESTDIR)$(libdir)
if test x$(CAIRODSONAME) = xlibfltk_cairo.so.$(FL_API_VERSION); then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.so*;\
$(INSTALL_LIB) libfltk_cairo.so.$(FL_API_VERSION) $(DESTDIR)$(libdir); \
$(LN) libfltk_cairo.so.$(FL_API_VERSION) $(DESTDIR)$(libdir)/libfltk_cairo.so;\
fi
if test x$(CAIRODSONAME) = xsrc/libfltk_cairo.sl.$(FL_API_VERSION); then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.sl*;\
$(INSTALL_LIB) libfltk_cairo.sl.$(FL_API_VERSION) $(DESTDIR)$(libdir); \
$(LN) libfltk_cairo.sl.$(FL_API_VERSION) $(DESTDIR)$(libdir)/libfltk_cairo.sl;\
fi
if test x$(CAIRODSONAME) = xlibfltk_cairo.$(FL_API_VERSION).dylib; then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.*dylib;\
$(INSTALL_LIB) libfltk_cairo.$(FL_API_VERSION).dylib $(DESTDIR)$(libdir); \
$(LN) libfltk_cairo.$(FL_API_VERSION).dylib $(DESTDIR)$(libdir)/libfltk_cairo.dylib;\
fi
if test x$(CAIRODSONAME) = xlibfltk_cairo_s.a; then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo_s.a;\
$(INSTALL_LIB) libfltk_cairo_s.a $(DESTDIR)$(libdir); \
fi
if test x$(CAIRODSONAME) = xcygfltknox_cairo-$(FL_API_VERSION).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); \
fi
if test x$(CAIRODSONAME) = xmgwfltknox_cairo-$(FL_API_VERSION).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); \
fi
#
# Uninstall everything...
#
uninstall:
echo "Uninstalling libfltk_cairo$(LIBEXT) in $(libdir)..."
if test x$(CAIROLIBNAME) != x; then\
$(RM) $(DESTDIR)$(libdir)/$(CAIROLIBNAME);\
fi
if test x$(CAIRODSONAME) = xlibfltk_cairo.so.$(FL_API_VERSION); then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.so*;\
fi
if test x$(CAIRODSONAME) = xlibfltk_cairo.sl.$(FL_API_VERSION); then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.sl*;\
fi
if test x$(CAIRODSONAME) = xlibfltk_cairo.$(FL_API_VERSION).dylib; then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.*dylib;\
fi
if test x$(CAIRODSONAME) = xlibfltk_cairo_s.a; then\
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo_s.a;\
fi
if test x$(CAIRODSONAME) = xcygfltknox_cairo-$(FL_API_VERSION).dll; then\
$(RM) $(DESTDIR)$(bindir)/$(CAIRODSONAME); \
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.dll.a;\
fi
if test x$(CAIRODSONAME) = xmgwfltknox_cairo-$(FL_API_VERSION).dll; then\
$(RM) $(DESTDIR)$(bindir)/$(CAIRODSONAME); \
$(RM) $(DESTDIR)$(libdir)/libfltk_cairo.dll.a;\
fi
$(CAIROOBJECTS): ../makeinclude
depend: $(CAIROCPPFILES)
makedepend -Y -I.. -f makedepend $(CAIROCPPFILES)
include makedepend
#
# End of "$Id: Makefile 5667 2007-02-07 02:35:44Z mike $".
#