1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00

First step to freebsd builds.

This commit is contained in:
Calvin Rose 2018-11-28 18:31:03 -05:00
parent b34e9a275c
commit 486d15d50d

View File

@ -17,6 +17,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE. # IN THE SOFTWARE.
.POSIX:
################################ ################################
##### Set global variables ##### ##### Set global variables #####
@ -29,7 +30,6 @@ LIBDIR=$(PREFIX)/lib
BINDIR=$(PREFIX)/bin BINDIR=$(PREFIX)/bin
JANET_VERSION?="\"commit-$(shell git log --pretty=format:'%h' -n 1)\"" JANET_VERSION?="\"commit-$(shell git log --pretty=format:'%h' -n 1)\""
#CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -g -DJANET_VERSION=$(JANET_VERSION)
CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \ CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \
-DJANET_VERSION=$(JANET_VERSION) -DJANET_VERSION=$(JANET_VERSION)
CLIBS=-lm -ldl CLIBS=-lm -ldl
@ -38,15 +38,10 @@ JANET_LIBRARY=libjanet.so
JANET_PATH?=/usr/local/lib/janet JANET_PATH?=/usr/local/lib/janet
DEBUGGER=gdb DEBUGGER=gdb
# Some system specifics (for macOS)
UNAME:=$(shell uname -s) UNAME:=$(shell uname -s)
LDCONFIG:=ldconfig LDCONFIG:=$(shell [ $(UNAME) != Darwin ] && echo "ldconfig")
ifeq ($(UNAME), Darwin) CLIBS:="$(CLIBS) $(shell [ $(UNAME) != Darwin ] && echo "-lrt -rdynamic")"
# Add other macos/clang flags
LDCONFIG:=
else
CFLAGS:=$(CFLAGS) -rdynamic
CLIBS:=$(CLIBS) -lrt
endif
# Source headers # Source headers
JANET_GENERATED_HEADERS= \ JANET_GENERATED_HEADERS= \