diff options
author | Mark Pulford <mark@kyne.com.au> | 2011-11-29 22:33:20 +1030 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2011-11-29 22:33:20 +1030 |
commit | 8f9fc89298f6547dc298289a5778a682673253e9 (patch) | |
tree | f65025ce6abb689bf1cd8c212f18638024538afb | |
parent | 8e259a73fd2fbf9060e3514cd67eee69ebfb85a7 (diff) | |
download | lua-cjson-8f9fc89298f6547dc298289a5778a682673253e9.tar.gz lua-cjson-8f9fc89298f6547dc298289a5778a682673253e9.tar.bz2 lua-cjson-8f9fc89298f6547dc298289a5778a682673253e9.zip |
Add common platform defaults/overrides to Makefile
-rw-r--r-- | Makefile | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -1,9 +1,6 @@ | |||
1 | CJSON_VERSION = 1.0.4 | 1 | CJSON_VERSION = 1.0.4 |
2 | LUA_VERSION = 5.1 | 2 | LUA_VERSION = 5.1 |
3 | 3 | ||
4 | # See http://lua-users.org/wiki/BuildingModules for platform specific | ||
5 | # details. | ||
6 | |||
7 | ## Available Lua CJSON specific workarounds | 4 | ## Available Lua CJSON specific workarounds |
8 | # | 5 | # |
9 | # To ensure JSON encoding/decoding works correctly for locales using | 6 | # To ensure JSON encoding/decoding works correctly for locales using |
@@ -13,30 +10,33 @@ LUA_VERSION = 5.1 | |||
13 | # USE_POSIX_SETLOCALE: Works on all ANSI C platforms. May be used when | 10 | # USE_POSIX_SETLOCALE: Works on all ANSI C platforms. May be used when |
14 | # thread-safety isn't required. | 11 | # thread-safety isn't required. |
15 | # | 12 | # |
16 | # USE_INTERNAL_ISINF: Handle Solaris platforms that are missing isinf(). | 13 | # USE_INTERNAL_ISINF: Workaround for Solaris platforms missing isinf(). |
14 | |||
15 | ## Common build defaults | ||
16 | PREFIX = /usr/local | ||
17 | CFLAGS_EXTRA = -DUSE_POSIX_SETLOCALE | ||
18 | LDFLAGS_EXTRA = -shared | ||
17 | 19 | ||
18 | # Tweak one of these platform sections below to suit your situation. | 20 | ## Platform overrides |
21 | # | ||
22 | # Tweaking one of the platform sections below to suit your situation. | ||
23 | # | ||
24 | # See http://lua-users.org/wiki/BuildingModules for further platform | ||
25 | # specific details. | ||
19 | 26 | ||
20 | ## Linux | 27 | ## Linux |
21 | PREFIX ?= /usr/local | 28 | CFLAGS_EXTRA = -DUSE_POSIX_USELOCALE |
22 | CFLAGS_EXTRA ?= -DUSE_POSIX_USELOCALE | ||
23 | LDFLAGS_EXTRA ?= -shared | ||
24 | 29 | ||
25 | ## FreeBSD | 30 | ## FreeBSD |
26 | #PREFIX ?= /usr/local | 31 | #LUA_INCLUDE_DIR = $(PREFIX)/include/lua51 |
27 | #CFLAGS_EXTRA ?= -DUSE_POSIX_SETLOCALE | ||
28 | #LUA_INCLUDE_DIR ?= $(PREFIX)/include/lua51 | ||
29 | #LDFLAGS_EXTRA ?= -shared | ||
30 | 32 | ||
31 | ## OSX (Macports) | 33 | ## MacOSX (Macports) |
32 | #PREFIX ?= /opt/local | 34 | #PREFIX = /opt/local |
33 | #CFLAGS_EXTRA ?= -DUSE_POSIX_USELOCALE | 35 | #CFLAGS_EXTRA = -DUSE_POSIX_USELOCALE |
34 | #LDFLAGS_EXTRA ?= -bundle -undefined dynamic_lookup | 36 | #LDFLAGS_EXTRA = -bundle -undefined dynamic_lookup |
35 | 37 | ||
36 | ## Solaris | 38 | ## Solaris |
37 | #PREFIX ?= /usr/local | 39 | #CFLAGS_EXTRA = -DUSE_POSIX_SETLOCALE -DUSE_INTERNAL_ISINF |
38 | #CFLAGS_EXTRA ?= -DUSE_POSIX_SETLOCALE -DUSE_INTERNAL_ISINF | ||
39 | #LDFLAGS_EXTRA ?= -shared | ||
40 | 40 | ||
41 | ## End platform specific section | 41 | ## End platform specific section |
42 | 42 | ||