moonbridge

view Makefile @ 37:c89d8d442987

Fixed comment on internal variable "input_state"
author jbe
date Mon Mar 02 00:54:58 2015 +0100 (2015-03-02)
parents 2916ad931f7e
children 22dbb9d09f02
line source
1 # BSD Makefile
2 # On GNU systems, use bmake.
4 PLATFORM != uname
6 .if $(PLATFORM) == "FreeBSD"
7 # Default configuration for FreeBSD
8 LUA_INCLUDE ?= /usr/local/include/lua52
9 LUA_LIBDIR ?= /usr/local/lib
10 LUA_LIBRARY ?= lua-5.2
11 UTIL_FLAGS ?= -lutil
13 .elif $(PLATFORM) == "Linux"
14 # Distinguish between different Linux distributions
15 DISTRIBUTION != lsb_release -i -s
16 .if $(DISTRIBUTION) == "Debian"
17 # Default configuration for Debian
18 LUA_INCLUDE ?= /usr/include/lua5.2
19 LUA_LIBDIR ?= /usr/lib
20 LUA_LIBRARY ?= lua5.2
21 UTIL_FLAGS ?= -ldl -lbsd -lrt
22 .elif $(DISTRIBUTION) == "Ubuntu"
23 # Default configuration for Ubuntu
24 LUA_INCLUDE ?= /usr/include/lua5.2
25 LUA_LIBDIR ?= /usr/lib/x86_64-linux-gnu
26 LUA_LIBRARY ?= lua5.2
27 UTIL_FLAGS ?= -ldl -lbsd
28 .else
29 # Default configuration for other Linux distributions
30 LUA_INCLUDE ?= /usr/include
31 LUA_LIBDIR ?= /usr/lib
32 LUA_LIBRARY ?= lua
33 UTIL_FLAGS ?= -ldl -lbsd
34 .endif
36 .else
37 # Default configuration for other systems
38 LUA_INCLUDE ?= /usr/include
39 LUA_LIBDIR ?= /usr/lib
40 LUA_LIBRARY ?= lua
41 UTIL_FLAGS ?= -lutil
43 .endif
45 .ifdef MOONBR_LUA_PATH
46 MOONBR_LUA_PATH_DEFINE = "-DMOONBR_LUA_PATH=\"$(MOONBR_LUA_PATH)\""
47 .endif
49 .ifdef MOONBR_LUA_CPATH
50 MOONBR_LUA_CPATH_DEFINE = "-DMOONBR_LUA_CPATH=\"$(MOONBR_LUA_CPATH)\""
51 .endif
53 all:: moonbridge
55 moonbridge: moonbridge.c
56 cc -Wall -Wno-unused-result -O2 -Wl,-E -I $(LUA_INCLUDE) -L $(LUA_LIBDIR) -o moonbridge $(MOONBR_LUA_PATH_DEFINE) $(MOONBR_LUA_CPATH_DEFINE) moonbridge.c -lm -l$(LUA_LIBRARY) $(UTIL_FLAGS)
58 clean::
59 rm -f moonbridge

Impressum / About Us