Explorar o código

Update Makefile to compile with LLVM C API

gingerBill %!s(int64=4) %!d(string=hai) anos
pai
achega
4272fe5e85
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      Makefile

+ 6 - 0
Makefile

@@ -8,6 +8,12 @@ OS=$(shell uname)
 
 ifeq ($(OS), Darwin)
 	LDFLAGS:=$(LDFLAGS) -liconv
+	CFLAGS:=$(CFLAGS) $(shell llvm-config --cflags) -DLLVM_BACKEND_SUPPORT -DUSE_NEW_LLVM_ABI_SYSTEM
+	LDFLAGS:=$(LDFLAGS) $(shell llvm-config --ldflags --libs)
+endif
+ifeq ($(OS), Linux)
+	CFLAGS:=$(CFLAGS) $(shell llvm-config --cflags) -DLLVM_BACKEND_SUPPORT -DUSE_NEW_LLVM_ABI_SYSTEM
+	LDFLAGS:=$(LDFLAGS) $(shell llvm-config --ldflags --libs)
 endif
 
 all: debug demo