# $Id$ # # A snippet for a makefile, which builds a shared library. # # Variables: # # srcdir ... source directory. # prefix ... install prefix # DESTDIR ... temporary destination directory, where prefix resides. (Used by debian and rpm packagers) # CC ... path of GNU C compiler # CXX ... path of GNU C++ compiler # CFLAGS ... C options like -Wall -g -O2 # CXXFLAGS ... C++ options like -Wall -g -O2 # WINDRES ... windows resource compiler, if $(ARTIFACT).rc is to be compiled in. # LD ... path of linker (either CC or CXX), for BUILDTYPE=so,dll,exe or bin # LDFLAGS ... Additional linker flags # SOURCES ... list of source packages to compile. # HEADERS ... list of headerr files to install. # HEADERDIR ... subdirectory of $(prefix)/include where to install headers. # INCLUDES ... list of optional include directories # LIBS ... optional list of additional libraries # SILENT_LIBS ... optional list of additional libraries, which are not propagated to pkg-config's .pc-file # PKGCONFIG ... path of the pkg-config tool. # EXTPKGS ... list of external pkg-config packages. # BUILDTYPE ... so or dll, will be autoguessed, if $(WINDRES) is defined to compile in resources, which is highly recommended. # ARTIFACT ... The name of the build artifact # ABI_VERSION ... Version of the ABI for shared libraries. # NODEVRULES ... If non-empty don't generate install-dev rules. # LIBSUBDIR ... subdirectory where executable should be installed. # Will be set to $(ARCHLIBSUBDIR) or as a last fallback to'lib' if empty. # (Sometimes may be 'lib/foo' or 'lib64') # SOPERMS ... permission of installed .so. files. # Default is 644 under debian and 755 under redhat. # ifeq ($(BUILDTYPE),) ifeq ($(WINDRES),) BUILDTYPE=so else BUILDTYPE=dll endif endif include /usr/share/pba-cbs/mk/common-targets.mk include /usr/share/pba-cbs/mk/common-compile.mk include /usr/share/pba-cbs/mk/common-link.mk include /usr/share/pba-cbs/mk/common-gettext.mk include /usr/share/pba-cbs/mk/common-pkgconfig.mk