# Configuration Makefile # # Part of the Routino routing software. # # This file Copyright 2013-2015 Andrew M. Bishop # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # # Installation locations (edit if required) prefix=/usr/local bindir=$(prefix)/bin docdir=$(prefix)/doc/routino datadir=$(prefix)/share/routino # Compilation programs CC=gcc LD=gcc # Language dialect selection CFLAGS=-std=c99 # Warning options CFLAGS+=-Wall -Wmissing-prototypes -Wextra -Wno-unused-parameter -pedantic # Optimisation options CFLAGS+=-O3 CFLAGS+=-ffast-math # Optimisation option (only works if compilation and execution use exactly the same CPU architecture). #CFLAGS+=-march=native # Debugging symbols #CFLAGS+=-g # Maths library LDFLAGS=-lm # Required for multi-threaded support (comment these two lines out if not required) CFLAGS+=-pthread -DUSE_PTHREADS LDFLAGS+=-pthread -lpthread ifndef MINGW # Required for bzip2 support (comment these two lines out if not required) CFLAGS+=-DUSE_BZIP2 LDFLAGS+=-lbz2 endif # Required for gzip support (comment these two lines out if not required) CFLAGS+=-DUSE_GZIP LDFLAGS+=-lz # Required for xz support (uncomment these two lines if required) #CFLAGS+=-DUSE_XZ #LDFLAGS+=-llzma # Required to use stdio with files > 2GiB on 32-bit system. CFLAGS+=-D_FILE_OFFSET_BITS=64 ifndef MINGW # Required to compile on Linux without a warning about pread() and pwrite() functions. CFLAGS+=-D_POSIX_C_SOURCE=200809L endif