X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=system.mk;h=11996f48c66d9ee02be7008a69a1786cee258710;hb=0e823ba752af388ba5ca99800d094f88a11290db;hp=32db47c60e282321eddd13a6aa490d94ebda836f;hpb=1cd244db6df1337d594b9e2456c735cbc28aea6c;p=ion3.git diff --git a/system.mk b/system.mk index 32db47c..11996f4 100644 --- a/system.mk +++ b/system.mk @@ -2,11 +2,12 @@ ## System settings ## - ## ## Installation paths ## +# Installation path prefix. Unless you know what you're doing, the default +# of /usr/local is likely the correct choice. PREFIX=/usr/local # Unless you are creating a package conforming to some OS's standards, you @@ -37,6 +38,9 @@ VARDIR=/var/cache/ion3 # Message catalogs LOCALEDIR=$(PREFIX)/share/locale +# Executable suffix (for Cygwin). +#BIN_SUFFIX = .exe + ## ## Modules @@ -44,9 +48,11 @@ LOCALEDIR=$(PREFIX)/share/locale # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded # modules through 'libdl' or has non-standard naming conventions. +# You will likely need this option on e.g. Cygwin and Mac OS X. #PRELOAD_MODULES=1 -# Flags to link with libdl. +# Flags to link with libdl. Even if PRELOAD_MODULES=1, you may need this +# setting (for e.g. Lua, when not instructed by pkg-config). DL_LIBS=-ldl @@ -74,6 +80,7 @@ LUAC=$(LUA_DIR)/bin/luac ## X libraries, includes and options ## +# Paths X11_PREFIX=/usr/X11R6 # SunOS/Solaris #X11_PREFIX=/usr/openwin @@ -97,30 +104,49 @@ DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND ## -## libc +## Localisation ## -# You may uncomment this if you know your system has -# asprintf and vasprintf in the c library. (gnu libc has.) -# If HAS_SYSTEM_ASPRINTF is not defined, an implementation -# in sprintf_2.2/ is used. -#HAS_SYSTEM_ASPRINTF=1 - # If you're on an archaic system (such as relatively recent *BSD releases) # without even dummy multibyte/widechar and localisation support, you may # have to uncomment the following line: -#DEFINES += -DCF_NO_LOCALE +#DEFINES += -DCF_NO_LOCALE -DCF_NO_GETTEXT -# On some other systems you may something like this: +# On some other systems you may need to explicitly link against libintl. #EXTRA_LIBS += -lintl -#EXTRA_INCLUDES += +# You may also need to give the location of its headers. The following +# should work on Mac OS X (which needs the above option as well) with +# macports. +#EXTRA_INCLUDES += -I/opt/local/include + + +## +## libc +## + +# You may uncomment this if you know that your system C libary provides +# asprintf and vasprintf. (GNU libc does.) If HAS_SYSTEM_ASPRINTF is not +# defined, an implementation provided in libtu/sprintf_2.2/ is used. +#HAS_SYSTEM_ASPRINTF=1 -# clock_gettime for monotonic time +# The following setting is needed with GNU libc for clock_gettime and the +# monotonic clock. Other systems may not need it, or may not provide a +# monotonic clock at all (which Ion can live with, and usually detect). EXTRA_LIBS += -lrt +# Cygwin needs this. +#DEFINES += -DCF_NO_GETLOADAVG + + +# +# If you're using/have gcc, it is unlikely that you need to modify +# any of the settings below this line. +# +##################################################################### + ## -## C compiler +## C compiler. ## CC=gcc @@ -131,8 +157,8 @@ WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ -Wtrigraphs -Wformat -Wchar-subscripts \ -Wparentheses -pedantic -Wuninitialized -CFLAGS=-g -Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES) -LDFLAGS=-g -Os $(EXTRA_LIBS) $(LIBS) +CFLAGS=-Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) +LDFLAGS=$(LIBS) $(EXTRA_LIBS) EXPORT_DYNAMIC=-Xlinker --export-dynamic # The following options are mainly for development use and can be used @@ -143,7 +169,7 @@ EXPORT_DYNAMIC=-Xlinker --export-dynamic #C89_SOURCE=-ansi -#POSIX_SOURCE=-D_POSIX_SOURCE +#POSIX_SOURCE=-D_POSIX_C_SOURCE=200112L # Most systems #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED @@ -164,9 +190,10 @@ EXPORT_DYNAMIC=-Xlinker --export-dynamic ## DEPEND_FILE=.depend -DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES) +DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) MAKE_DEPEND=$(DO_MAKE_DEPEND) $(SOURCES) > $(DEPEND_FILE) + ## ## AR ## @@ -181,11 +208,19 @@ RANLIB=ranlib ## INSTALL=sh $(TOPDIR)/install-sh -c +INSTALL_STRIP=-s INSTALLDIR=mkdir -p BIN_MODE=755 DATA_MODE=644 -STRIP=strip - RM=rm + + +## +## Debugging +## + +#INSTALL_STRIP = +#CFLAGS += -g +