# $Id: Makefile.config 3085 2015-08-25 05:39:31Z tpgww $ ##################### ### documentation ### ##################### # setting this to 1 makes the default docs dir include the current version no. DOCS_VERSION ?= 0 #the name of the default main-user-guide document HELPDOC ?= USAGE #the name of the default configuration help document CONFIGDOC ?= CONFIGURATION #################### ### misc options ### #################### #install desktop environment integration files XDG_INTEGRATION ?= 1 # gettext/internationalisation support # (is automatically turned off if you don't have gettext) I18N ?= 1 # setting this to 1 makes the default file-pane layout "horizontal" (stacked # top-to-bottom) PANES_HORIZONTAL ?= 0 # setting this to 1 enables setting window-transparency for e2 # (i.e. independent of window-manager settings) # ignored unless built for gtk >= 2.12, so also need WITH_LATEST=1 WITH_TRANSPARENCY ?= 0 # GLib and GTK+ by default assume that filenames are encoded in UTF-8 # (or ASCII which is compatible with UTF-8). # The default value 0 supports on-demand conversion of path/filename strings # not in UTF-8/ASCII, but if you don't need that, then setting it to 1 omits # the conversions, resulting in smaller code and faster operation # NOTE if you use names with non-utf-8 / non-ascii characters # (e.g. with german umlauts), you should also have set the environment variable # G_FILENAME_ENCODING and/or G_BROKEN_FILENAMES. The INSTALL document has more # information on this. FILES_UTF8ONLY ?= 0 # setting this to 1 provides support for assistive-technologies, to facilitate # operation by users with impaired sense(s). Not yet fully implemented WITH_ASSIST ?= 0 # See comments in file INSTALL about the merits of various file-alteration # monitors which may be enabled by the following options. # NOTE enable NO MORE THAN ONE of the monitors - inotify gamin etc # setting this to 1 provides support for file-change monitoring using kernel # infrastructure if that's available, or normal polling if not available # NOTE only linux is definitely supported at this time WITH_KERNELFAM ?= 0 # setting one of these 1 provides support for file-change monitoring using # inotify (on linux) if that's available, or normal polling if not available # or using kqueue (on BSD, OSX) if that's available, or normal polling if # not available # NOTE kqueue-usage has been coded but not tested # (volunteer needed to test and finalise) # file-change monitoring (on solaris) using portevent is a TODO # (volunteer needed to work on that) ifeq ($(WITH_KERNELFAM), 1) USE_INOTIFY ?= 1 USE_KQUEUE ?= 0 USE_PORTEVENT ?= 0 else USE_INOTIFY ?= 0 USE_KQUEUE ?= 0 USE_PORTEVENT ?= 0 endif # setting this to 1 provides support for file-change monitoring using gamin if # that's available, or normal polling if not available. # No reason to enable this if kernel monitoring (inotify etc) is used USE_GAMIN ?= 0 # Setting EDITOR_SPELLCHECK to 0/1 dis/enables spell-checking (using GtkSpell) # in the internal editor. # To build this you will need to have installed gtkspell and aspell development # files, and to run it, the speller library and the underlying aspell and its # dictionaries. # NOTE this capability needs either gtkspell >= 2.0.14, or a patched gtkspell # 2.0.11 to 2.0.13. The patch is available from emeFM2 website. EDITOR_SPELLCHECK ?= 0 # Setting WITH_OUTPUTSTYLES to 0/1 dis/enables processing some terminal escape-codes # in displayed output text. Specifically, most of the ANSII codes like [...m # including the so-called xterm colours. WITH_OUTPUTSTYLES ?= 0 # Setting WITH_CUSTOMMOUSE to 0/1 dis/enables user-configurable bindings for # pointer-device (mouse etc.) buttons and gestures WITH_CUSTOMMOUSE ?= 0 # Setting EXTRA_BINDINGS to 0/1 dis/enables keybindings for _specific_ types of # "transient" elements of the emelFM2 GUI, like edit-dialogs. In practice, to # make such bindings work, some extra functionality for the elements in # question must be enabled. As of now, such code has been done only for view, # edit and thumbnails dialogs, for evaluation and testing purposes EXTRA_BINDINGS ?= 0 # setting this to 1 forces a gtk2 build, particularly relevant to override # automatic detection and use of gtk3 build-infrastructure with WITH_LATEST=1 WITH_GTK2 ?= 0 # setting this to 1 initiates a 'minimum' build to Gtk v.3.0 standard, instead # of v.2.6. Of course, you must have the corresponding development environment # available, and gtk3-compatible versions of any other necessary libraries # e.g. for spell-checking WITH_GTK3 ?= 0 # setting this to 0 causes a build to the minimum Gtk standard (v.2.6 or v.3.0), # omitting (not much) different functionality applicable to the Gtk version of # the current build environment, if that's later than 2.6 or 3.0 WITH_LATEST ?= 1 # deprecated, use WITH_LATEST instead USE_LATEST ?= 0 # setting this to 1 DISABLES protection against concurrent interaction with the # display server. Such protection is mandatory if that server is not threadsafe # (this is you, X !!) # This setting is ignored on gtk2 USE_WAYLAND ?= 0 # setting this to 1 utilises replacement code for command execution. It's known # to work reasonably for some (most ?) OS's, but needs further evaluation on linux 2.4 # (though if it's still a problem there, it's not fatal, just wasteful of CPU cycles) NEW_COMMAND ?= 0 # setting this to 1 enables UDisks/DeviceKit and dbus code, for detecting and # responding to added and removed volumes. Prefers udisks, but will fall back # to devicekit-disks if udisks is not available at runtime. # Requires udisks or devicekit-disks (maybe >= 009?), and (for glib < 2.26) dbus-glib WITH_UDISKS ?= 0 # deprecated, use WITH_UDISKS instead WITH_DEVKIT ?= 0 # setting this to 1 enables HAL and dbus code, for detecting and responding to # added and removed volumes. # NOTE HAL is deprecated, to be superseded by udisks, see above. # Requires HAL, dbus and (for glib < 2.26) dbus-glib WITH_HAL ?= 0 # setting this to 1 enables a thumbnail viewer plugin. This uses libgimpthumb for # managing thumbnail-file cacheing in accord with freedesktop.org specification. # At least version 2.2 of that library is needed in order for the plugin to load # at runtime. Corresponding development files are needed for building the plugin WITH_THUMBS ?= 0 # DO NOT set this 1 UNLESS you've built and installed the 'bugfixed' shared version # of libgimpthumb (called libthumbs) available from http://emelfm2.net/wiki/OtherDownLoads # The default value causes code 'extracted' from that library to be included # directly in the plugin WITH_THUMBLIB ?= 0 # setting this to 1 enables a tracker-UI plugin. This uses shell commands to # interrogate tracker data, and so no external library is needed at runtime or # development file at build time (these may change if tracker's API is updated) WITH_TRACKER ?= 0 # setting this to 1 enables an Access-Control-List-management plugin. This uses # libacl - with a reasonably full (sort-of POSIX) API. # Corresponding development files are needed for building the plugin WITH_ACL ?= 0 # setting this to 1 enables policykit-based functionality e.g. to run commands # with super-user privileges. Requires polkit, which in turn seems to need gio/glib >= 2.18. WITH_POLKIT ?= 0 # setting this to 1 enables a plugin to support different namespaces (a.k.a. # VFS. It uses libgio capabilities, and so needs glib >= 2.16 # NOT YET FUNCTIONAL WITH_VFS ?= 0 # the namespaces plugin can, in principle, work with various backend vfs libraries. # Sofar only gvfs is enabled, and for that, a separate gvfs plugin is used. # NOT YET FUNCTIONAL WITH_GVFS ?= 0 # gtk's 3.10+ deprecate or omit all 'stock' (default) icons, presumably on the # basis that gtk themes are supposed to fill the gaps. At least initially, this # did not occur, resulting in lots of 'missing icon' displays. # Setting this to 1 causes relevant stock icons to be installed by emelFM2 itself, # when built for gtk >= 3.10. WITH_SYSTEM_ICONS ?= 0 # setting DEBUG to 0/1 turns off/on debugging messages and in-file data for debuggers DEBUG ?= 0 ############################ ### installation (where) ### ############################ # change this to use a customized name for the installed binary and related folders. # For example, setting this to 'emelfm2-svn' would install a binary named 'emelfm2-svn', # plugins and pixmaps in an 'emelfm2-svn' folder, and the configuration data would # be in '~/.config/emelfm2-svn'. # This allows for parallel installation of different emelFM2 versions (e.g. # release and SVN trunk) on the same system. # To make this work you would need to specify the variable in each make command e.g.: # make TARGET=emelfm2-svn # make TARGET=emelfm2-svn install # make TARGET=emelfm2-svn uninstall # make TARGET=emelfm2-svn clean # You will probably also need to alter some content in the .desktop and .application # files in .../docs TARGET ?= emelfm2 # PROGNAME is a string used mainly for 'public' purposes, such as the about-dialog # and window-titles. If you override TARGET, you may wish to do likewise with PROGNAME # (for the initial make command, only) PROGNAME ?= emelFM2 #as well as 'make' usage, all in-code uses of these paths assumes they're localised. #path variable(s) can safely be altered for installation, e.g. to specify a path for #packaging, like $BUILDROOT/usr/local ... #NOTE: changing PREFIX affects the default location of the custom icon files. #The configuration file (typically ~/.config/emelfm2/config) includes paths for #custom icon files, so if you have previously installed emelFM2 with a different #PREFIX, the pre-existing config file, even if it has the current version number, #will include icon paths which don't match the current PREFIX. The easiest #solution for "missing" icon files is to open the emelFM2 configuration dialog, #and click the "Default" button. PREFIX ?= /usr/local BIN_DIR ?= $(PREFIX)/bin LIB_DIR ?= $(PREFIX)/lib PLUGINS_DIR ?= $(LIB_DIR)/$(TARGET)/plugins #FIXME by default, apps should look for icons in $XDG_DATA_DIRS/icons and in # /usr/share/pixmaps (in that order). ICON_DIR ?= $(PREFIX)/share/pixmaps/$(TARGET) LOCALE_DIR ?= $(PREFIX)/share/locale MAN_DIR ?= $(PREFIX)/share/man/man1 # version-number suffix is appended to doc-path in main Makefile, if appropriate DOC_DIR ?= $(PREFIX)/share/doc/$(TARGET) #where to install emelfm2.desktop and emelfm2.applications #for desktop environment integration XDG_DESKTOP_DIR ?= $(PREFIX)/share/applications ######################### ### compilation (how) ### ######################### CC ?= gcc PKG_CONFIG ?= pkg-config ifeq ($(DEBUG), 1) #additional CFLAGS (-g -O0) always added when in debug mode #CFLAGS ?= -Wall -Wextra -Wno-unused -Winline CFLAGS ?= -Wall -Winline else CFLAGS ?= -O2 -Wall #CFLAGS ?= -O3 -Wall -march=athlon-tbird -mtune=athlon-tbird #CFLAGS ?= -O3 -Wall -march=pentium -mtune=pentium4 endif #additional CFLAG (-Wl,--as-needed) added when linking main application #if using gcc >= 4.5, consider adding -flto to CFLAGS # setting this to 0 prevents stipping of symbols from built files STRIP ?= 1