mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 11:40:11 +03:00
Port to FreeBSD
This commit is contained in:
parent
ea7bd8e695
commit
7fdcc66815
7
Makefile
7
Makefile
@ -36,10 +36,17 @@ BIN=bin
|
|||||||
LIB=$(shell pwd)/urb
|
LIB=$(shell pwd)/urb
|
||||||
|
|
||||||
RM=rm -f
|
RM=rm -f
|
||||||
|
ifneq ($(UNAME),FreeBSD)
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CXXFLAGS=$(CFLAGS)
|
CXXFLAGS=$(CFLAGS)
|
||||||
CLD=g++ -O3 -L/usr/local/lib -L/opt/local/lib
|
CLD=g++ -O3 -L/usr/local/lib -L/opt/local/lib
|
||||||
|
else
|
||||||
|
CC=cc
|
||||||
|
CXX=c++
|
||||||
|
CXXFLAGS=$(CFLAGS)
|
||||||
|
CLD=c++ -O3 -L/usr/local/lib -L/opt/local/lib
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),osx)
|
ifeq ($(OS),osx)
|
||||||
COSFLAGS=-fno-diagnostics-fixit-info
|
COSFLAGS=-fno-diagnostics-fixit-info
|
||||||
|
@ -55,6 +55,10 @@ urbit depends on:
|
|||||||
|
|
||||||
sudo port install git gmp libsigsegv openssl autoconf automake cmake
|
sudo port install git gmp libsigsegv openssl autoconf automake cmake
|
||||||
|
|
||||||
|
#### FreeBSD
|
||||||
|
|
||||||
|
pkg install gmake gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool
|
||||||
|
|
||||||
Although `automake`/`autoconf`/`libtool` are generally installed by
|
Although `automake`/`autoconf`/`libtool` are generally installed by
|
||||||
default, some have reported needing to uninstall and reinstall those
|
default, some have reported needing to uninstall and reinstall those
|
||||||
three packages, at least with Homebrew. Your mileage may vary.
|
three packages, at least with Homebrew. Your mileage may vary.
|
||||||
@ -74,6 +78,8 @@ Just run `make`:
|
|||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
|
(On FreeBSD, use `gmake` instead.)
|
||||||
|
|
||||||
Run
|
Run
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -146,10 +146,12 @@
|
|||||||
|
|
||||||
/* Sync
|
/* Sync
|
||||||
*/
|
*/
|
||||||
# if defined(U3_OS_linux) || defined(U3_OS_bsd)
|
# if defined(U3_OS_linux)
|
||||||
# define c3_sync(fd) (fdatasync(fd))
|
# define c3_sync(fd) (fdatasync(fd))
|
||||||
# elif defined(U3_OS_osx)
|
# elif defined(U3_OS_osx)
|
||||||
# define c3_sync(fd) (fcntl(fd, F_FULLFSYNC, 0))
|
# define c3_sync(fd) (fcntl(fd, F_FULLFSYNC, 0))
|
||||||
|
# elif defined(U3_OS_bsd)
|
||||||
|
# define c3_sync(fd) (fsync(fd))
|
||||||
# else
|
# else
|
||||||
# error "port: sync"
|
# error "port: sync"
|
||||||
# endif
|
# endif
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
SHELL = sh
|
SHELL = sh
|
||||||
|
UNAME = $(shell uname)
|
||||||
|
|
||||||
|
ifneq ($(UNAME),FreeBSD)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
else
|
||||||
|
CC = cc
|
||||||
|
endif
|
||||||
FLAGS = -c -fPIC -Iinclude/
|
FLAGS = -c -fPIC -Iinclude/
|
||||||
CFLAGS = --pedantic -Wall -Wextra -march=native -std=gnu99
|
CFLAGS = --pedantic -Wall -Wextra -march=native -std=gnu99
|
||||||
INCLUDE = include/anachronism
|
INCLUDE = include/anachronism
|
||||||
|
Loading…
Reference in New Issue
Block a user