Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /branches/libroutino/Makefile.conf
Parent Directory
|
Revision Log
Revision 1782 -
(show annotations)
(download)
Fri Aug 14 19:02:33 2015 UTC (9 years, 7 months ago) by amb
File size: 2895 byte(s)
Fri Aug 14 19:02:33 2015 UTC (9 years, 7 months ago) by amb
File size: 2895 byte(s)
Fully automatic host detection (for Cygwin, MinGW and generic UNIX).
1 | # Configuration Makefile |
2 | # |
3 | # Part of the Routino routing software. |
4 | # |
5 | # This file Copyright 2013-2015 Andrew M. Bishop |
6 | # |
7 | # This program is free software: you can redistribute it and/or modify |
8 | # it under the terms of the GNU Affero General Public License as published by |
9 | # the Free Software Foundation, either version 3 of the License, or |
10 | # (at your option) any later version. |
11 | # |
12 | # This program is distributed in the hope that it will be useful, |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | # GNU Affero General Public License for more details. |
16 | # |
17 | # You should have received a copy of the GNU Affero General Public License |
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | # |
20 | |
21 | # Automatic operating system detection |
22 | |
23 | UNAME=$(shell uname) |
24 | |
25 | HOST=UNIX |
26 | |
27 | ifneq ($(findstring CYGWIN,$(UNAME)),) |
28 | HOST=CYGWIN |
29 | endif |
30 | |
31 | ifneq ($(findstring MINGW,$(UNAME)),) |
32 | HOST=MINGW |
33 | endif |
34 | |
35 | |
36 | # Installation locations (edit if required) |
37 | |
38 | ifneq ($(HOST),MINGW) |
39 | prefix=/usr/local |
40 | bindir=$(prefix)/bin |
41 | incdir=$(prefix)/include |
42 | libdir=$(prefix)/lib |
43 | docdir=$(prefix)/doc/routino |
44 | datadir=$(prefix)/share/routino |
45 | else |
46 | prefix="c:/Program Files/Routino" |
47 | bindir=$(prefix)/bin |
48 | incdir=$(prefix)/include |
49 | libdir=$(prefix)/lib |
50 | docdir=$(prefix)/doc |
51 | datadir=$(prefix)/xml |
52 | endif |
53 | |
54 | |
55 | # Compilation programs |
56 | CC=gcc |
57 | LD=gcc |
58 | |
59 | |
60 | # Language dialect selection |
61 | CFLAGS=-std=c99 |
62 | |
63 | # Warning options |
64 | CFLAGS+=-Wall -Wmissing-prototypes -Wextra -Wno-unused-parameter -pedantic |
65 | |
66 | # Optimisation options |
67 | CFLAGS+=-O3 |
68 | CFLAGS+=-ffast-math |
69 | |
70 | # Optimisation option (only works if compilation and execution use exactly the same CPU architecture). |
71 | #CFLAGS+=-march=native |
72 | |
73 | # Debugging symbols |
74 | #CFLAGS+=-g |
75 | |
76 | |
77 | # Maths library |
78 | LDFLAGS=-lm |
79 | |
80 | |
81 | # Extra flags for compiling libroutino shared library (visibility of symbols, shared) |
82 | CFLAGS_LIB=-fvisibility=hidden |
83 | LDFLAGS_LIB=-shared |
84 | |
85 | ifeq ($(HOST),UNIX) |
86 | # Extra flags for compiling libroutino shared library (position independent code) |
87 | CFLAGS_LIB+=-fPIC |
88 | LDFLAGS_LIB+=-fPIC |
89 | endif |
90 | |
91 | # Put the current directory in the shared library path for the router using libroutino |
92 | LDFLAGS_LDSO=-Wl,-R. |
93 | |
94 | |
95 | # Required for multi-threaded support (comment these two lines out if not required) |
96 | CFLAGS+=-pthread -DUSE_PTHREADS |
97 | LDFLAGS+=-pthread -lpthread |
98 | |
99 | |
100 | ifneq ($(HOST),MINGW) |
101 | # Required for bzip2 support (comment these two lines out if not required) |
102 | CFLAGS+=-DUSE_BZIP2 |
103 | LDFLAGS+=-lbz2 |
104 | endif |
105 | |
106 | |
107 | # Required for gzip support (comment these two lines out if not required) |
108 | CFLAGS+=-DUSE_GZIP |
109 | LDFLAGS+=-lz |
110 | |
111 | |
112 | # Required for xz support (uncomment these two lines if required) |
113 | #CFLAGS+=-DUSE_XZ |
114 | #LDFLAGS+=-llzma |
115 | |
116 | |
117 | # Required to use stdio with files > 2GiB on 32-bit system. |
118 | CFLAGS+=-D_FILE_OFFSET_BITS=64 |
119 | |
120 | |
121 | ifneq ($(HOST),MINGW) |
122 | # Required to compile on Linux without a warning about pread() and pwrite() functions. |
123 | CFLAGS+=-D_POSIX_C_SOURCE=200809L |
124 | endif |