Skip to content

Commit

Permalink
Ensure spook compiles properly on FreeBSD. Add some notes on that.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnae committed Apr 4, 2017
1 parent 03358ad commit 7050b70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ PREFIX ?= /usr/local
UNAME := $(shell uname | tr 'A-Z' 'a-z')
ARCH := $(shell uname -m)
SPOOK_BASE_DIR := $(shell pwd)
CFLAGS = -Wall -O2 -Wl,-E
EXTRAS = -lrt
ifeq ($(UNAME), darwin)
CFLAGS = -Wall -O2 -Wl
EXTRAS = -pagezero_size 10000 -image_base 100000000
else
CFLAGS = -Wall -O2 -Wl,-E
EXTRAS = -lrt
endif
GITTAG := $(shell git tag -l --contains HEAD)
GITBRANCH := $(shell git symbolic-ref --short HEAD)
Expand All @@ -33,7 +32,7 @@ all: spook

spook: $(OBJECTS)
@echo "BUILDING SPOOK"
$(CC) $(CFLAGS) -fPIC -o spook app.c $(OBJECTS) $(ARCHIVES) -I $(LUAJIT_INCLUDE) -lm -ldl $(EXTRAS)
$(CC) $(CFLAGS) -fPIC -o spook app.c $(OBJECTS) $(ARCHIVES) -I $(LUAJIT_INCLUDE) -lm $(EXTRAS)

rebuild: clean all

Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ Buiding spook requires the usual tools (eg. make and gcc/clang), so you may need
make
```

After that you should have an executable called spook. It's known to build and work well on Linux and Mac OS X. It should also work fine on the BSD:s.
After that you should have an executable called spook. It's known to build and work well on Linux and Mac OS X. It's also verified to work on FreeBSD. On FreeBSD, the easiest way to make it compile is to install gmake and link /usr/bin/cc to /usr/local/bin/gcc (clang is cc on FreeBSD), like this:

```sh
sudo pkg install gmake
sudo ln -s /usr/bin/cc /usr/local/bin/gcc
gmake
```

Everything in the lib directory and toplevel is part of spook itself, anything in vendor and deps is other peoples work.

Expand Down

0 comments on commit 7050b70

Please sign in to comment.