Browse Source

Update Makefile to compile with LLVM C API

gingerBill 4 years ago
parent
commit
4272fe5e85
1 changed files with 6 additions and 0 deletions
  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