mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
pass -ldl only on Darwin and Linux
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
GIT_SHA=$(shell git rev-parse --short HEAD)
|
GIT_SHA=$(shell git rev-parse --short HEAD)
|
||||||
DISABLED_WARNINGS=-Wno-switch -Wno-macro-redefined -Wno-unused-value
|
DISABLED_WARNINGS=-Wno-switch -Wno-macro-redefined -Wno-unused-value
|
||||||
LDFLAGS=-pthread -ldl -lm -lstdc++
|
LDFLAGS=-pthread -lm -lstdc++
|
||||||
CFLAGS=-std=c++14 -DGIT_SHA=\"$(GIT_SHA)\"
|
CFLAGS=-std=c++14 -DGIT_SHA=\"$(GIT_SHA)\"
|
||||||
CFLAGS:=$(CFLAGS) -DODIN_VERSION_RAW=\"dev-$(shell date +"%Y-%m")\"
|
CFLAGS:=$(CFLAGS) -DODIN_VERSION_RAW=\"dev-$(shell date +"%Y-%m")\"
|
||||||
CC=clang
|
CC=clang
|
||||||
@@ -8,7 +8,7 @@ CC=clang
|
|||||||
OS=$(shell uname)
|
OS=$(shell uname)
|
||||||
|
|
||||||
ifeq ($(OS), Darwin)
|
ifeq ($(OS), Darwin)
|
||||||
|
|
||||||
ARCH=$(shell uname -m)
|
ARCH=$(shell uname -m)
|
||||||
LLVM_CONFIG=
|
LLVM_CONFIG=
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ ifeq ($(OS), Darwin)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDFLAGS:=$(LDFLAGS) -liconv
|
LDFLAGS:=$(LDFLAGS) -liconv -ldl
|
||||||
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
|
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
|
||||||
LDFLAGS:=$(LDFLAGS) -lLLVM-C
|
LDFLAGS:=$(LDFLAGS) -lLLVM-C
|
||||||
endif
|
endif
|
||||||
@@ -55,14 +55,16 @@ ifeq ($(OS), Linux)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LDFLAGS:=$(LDFLAGS) -ldl
|
||||||
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
|
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
|
||||||
LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
|
LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS), OpenBSD)
|
ifeq ($(OS), OpenBSD)
|
||||||
LLVM_CONFIG=/usr/local/bin/llvm-config
|
LLVM_CONFIG=/usr/local/bin/llvm-config
|
||||||
|
|
||||||
|
LDFLAGS:=$(LDFLAGS) -liconv
|
||||||
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
|
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
|
||||||
LDFLAGS:=$(LDFLAGS) -liconv $(shell $(LLVM_CONFIG) --libs core native --system-libs)
|
LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: debug demo
|
all: debug demo
|
||||||
|
|||||||
Reference in New Issue
Block a user