Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
fix build for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlebron committed Mar 13, 2015
1 parent c4613d0 commit e9da37f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
22 changes: 15 additions & 7 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,21 @@ So these are the wonky, unautomated steps to build the mac bundle:
- Install Lua 5.2
```sh
curl -R -O http://www.lua.org/ftp/lua-5.2.0.tar.gz
tar zxf lua-5.2.0.tar.gz
cd lua-5.2.0
make linux test
sudo make install
```
- On Debian or Ubuntu:
```sh
sudo apt-get install liblua5.2-dev
```
- Otherwise install from source:
```sh
curl -R -O http://www.lua.org/ftp/lua-5.2.0.tar.gz
tar zxf lua-5.2.0.tar.gz
cd lua-5.2.0
make linux test
sudo make install
```
- Install SDL 2
Expand Down
12 changes: 11 additions & 1 deletion engine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,19 @@ endif
ifeq ($(TARGET_OS),UNIX)
COMMON_CPPFLAGS += -DELF
COMMON_OBJS += net_udp.o sys_unix.o
COMMON_LIBS += m lua
COMMON_LIBS += m
NQCL_OBJS += net_bsd.o

# workaround for Blinky issue 74: https://github.com/shaunlebron/blinky/issues/74
# We seem to have to use lua5.2 library in debian.
IS_DEBIAN = $(shell test -f /etc/debian-version && echo "Y" || echo "N")
ifeq ($(IS_DEBIAN),Y)
COMMON_CPPFLAGS += $(shell pkg-config --cflags lua5.2)
COMMON_LIBS += lua5.2
else
COMMON_LIBS += lua
endif

# FIXME - stupid hack
ifeq ($(APP_BUNDLE),Y)
COMMON_CPPFLAGS += -Dmain=SDL_main
Expand Down

0 comments on commit e9da37f

Please sign in to comment.