mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Make Tippecanoe build on FreeBSD in response to issue 18 (#72)
* Make tippecanoe build on FreeBSD in responce to issue 18 (https://github.com/felt/tippecanoe/issues/18) * Make conditional FreeBSD specific, instead of otherway around.
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
MANDIR ?= $(PREFIX)/share/man/man1/
|
MANDIR ?= $(PREFIX)/share/man/man1/
|
||||||
BUILDTYPE ?= Release
|
BUILDTYPE ?= Release
|
||||||
SHELL = /bin/bash
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
|
||||||
# inherit from env if set
|
# inherit from env if set
|
||||||
CC := $(CC)
|
CC := $(CC)
|
||||||
@@ -13,6 +14,15 @@ WARNING_FLAGS := -Wall -Wshadow -Wsign-compare -Wextra -Wunreachable-code -Wunin
|
|||||||
RELEASE_FLAGS := -O3 -DNDEBUG
|
RELEASE_FLAGS := -O3 -DNDEBUG
|
||||||
DEBUG_FLAGS := -O0 -DDEBUG -fno-inline-functions -fno-omit-frame-pointer
|
DEBUG_FLAGS := -O0 -DDEBUG -fno-inline-functions -fno-omit-frame-pointer
|
||||||
|
|
||||||
|
|
||||||
|
OS := $(shell uname -o)
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
ADVSHELL = /usr/local/bin/bash
|
||||||
|
else
|
||||||
|
ADVSHELL = /bin/bash
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(BUILDTYPE),Release)
|
ifeq ($(BUILDTYPE),Release)
|
||||||
FINAL_FLAGS := -g $(WARNING_FLAGS) $(RELEASE_FLAGS)
|
FINAL_FLAGS := -g $(WARNING_FLAGS) $(RELEASE_FLAGS)
|
||||||
else
|
else
|
||||||
@@ -111,7 +121,7 @@ fewer-tests: tippecanoe tippecanoe-decode geobuf-test raw-tiles-test parallel-te
|
|||||||
cmp $@.out $(patsubst %.checkbuf,%,$@)
|
cmp $@.out $(patsubst %.checkbuf,%,$@)
|
||||||
rm $@.out $@.mbtiles
|
rm $@.out $@.mbtiles
|
||||||
|
|
||||||
parallel-test:
|
parallel-test: $(eval SHELL:=$(ADVSHELL))
|
||||||
mkdir -p tests/parallel
|
mkdir -p tests/parallel
|
||||||
perl -e 'for ($$i = 0; $$i < 20; $$i++) { $$lon = rand(360) - 180; $$lat = rand(180) - 90; $$k = rand(1); $$v = rand(1); print "{ \"type\": \"Feature\", \"properties\": { \"yes\": \"no\", \"who\": 1, \"$$k\": \"$$v\" }, \"geometry\": { \"type\": \"Point\", \"coordinates\": [ $$lon, $$lat ] } }\n"; }' > tests/parallel/in1.json
|
perl -e 'for ($$i = 0; $$i < 20; $$i++) { $$lon = rand(360) - 180; $$lat = rand(180) - 90; $$k = rand(1); $$v = rand(1); print "{ \"type\": \"Feature\", \"properties\": { \"yes\": \"no\", \"who\": 1, \"$$k\": \"$$v\" }, \"geometry\": { \"type\": \"Point\", \"coordinates\": [ $$lon, $$lat ] } }\n"; }' > tests/parallel/in1.json
|
||||||
perl -e 'for ($$i = 0; $$i < 300000; $$i++) { $$lon = rand(360) - 180; $$lat = rand(180) - 90; print "{ \"type\": \"Feature\", \"properties\": { }, \"geometry\": { \"type\": \"Point\", \"coordinates\": [ $$lon, $$lat ] } }\n"; }' > tests/parallel/in2.json
|
perl -e 'for ($$i = 0; $$i < 300000; $$i++) { $$lon = rand(360) - 180; $$lat = rand(180) - 90; print "{ \"type\": \"Feature\", \"properties\": { }, \"geometry\": { \"type\": \"Point\", \"coordinates\": [ $$lon, $$lat ] } }\n"; }' > tests/parallel/in2.json
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user