mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-24 18:44:07 +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
|
||||
|
||||
RM=rm -f
|
||||
ifneq ($(UNAME),FreeBSD)
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
CXXFLAGS=$(CFLAGS)
|
||||
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)
|
||||
COSFLAGS=-fno-diagnostics-fixit-info
|
||||
|
@ -55,6 +55,10 @@ urbit depends on:
|
||||
|
||||
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
|
||||
default, some have reported needing to uninstall and reinstall those
|
||||
three packages, at least with Homebrew. Your mileage may vary.
|
||||
@ -74,6 +78,8 @@ Just run `make`:
|
||||
|
||||
make
|
||||
|
||||
(On FreeBSD, use `gmake` instead.)
|
||||
|
||||
Run
|
||||
---
|
||||
|
||||
|
@ -146,10 +146,12 @@
|
||||
|
||||
/* Sync
|
||||
*/
|
||||
# if defined(U3_OS_linux) || defined(U3_OS_bsd)
|
||||
# if defined(U3_OS_linux)
|
||||
# define c3_sync(fd) (fdatasync(fd))
|
||||
# elif defined(U3_OS_osx)
|
||||
# define c3_sync(fd) (fcntl(fd, F_FULLFSYNC, 0))
|
||||
# elif defined(U3_OS_bsd)
|
||||
# define c3_sync(fd) (fsync(fd))
|
||||
# else
|
||||
# error "port: sync"
|
||||
# endif
|
||||
|
@ -1,6 +1,11 @@
|
||||
SHELL = sh
|
||||
UNAME = $(shell uname)
|
||||
|
||||
ifneq ($(UNAME),FreeBSD)
|
||||
CC = gcc
|
||||
else
|
||||
CC = cc
|
||||
endif
|
||||
FLAGS = -c -fPIC -Iinclude/
|
||||
CFLAGS = --pedantic -Wall -Wextra -march=native -std=gnu99
|
||||
INCLUDE = include/anachronism
|
||||
|
Loading…
Reference in New Issue
Block a user