X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=examples%2FKaleidoscope%2FOrc%2Flazy_irgen%2FMakefile;h=5536314f2a30906c750f6a6d74c0d4c71417df01;hp=df0fcb35066575e1e3e460f8f4f350244cb220b4;hb=479637161581e79a2659ffac0b62c2c0d53ea5f3;hpb=4f79dee97c9039b0174f95575baa95addcdaf48a diff --git a/examples/Kaleidoscope/Orc/lazy_irgen/Makefile b/examples/Kaleidoscope/Orc/lazy_irgen/Makefile index df0fcb35066..5536314f2a3 100644 --- a/examples/Kaleidoscope/Orc/lazy_irgen/Makefile +++ b/examples/Kaleidoscope/Orc/lazy_irgen/Makefile @@ -1,8 +1,16 @@ -.PHONY: all -all: toy +UNAME := $(shell uname -s) + +ifeq ($(UNAME),Darwin) + CXX := xcrun --sdk macosx clang++ +else + CXX := clang++ +endif + +LLVM_CXXFLAGS := $(shell llvm-config --cxxflags) +LLVM_LDFLAGS := $(shell llvm-config --ldflags --system-libs --libs core orcjit native) toy: toy.cpp - clang++ -Wall -std=c++11 toy.cpp -g -O0 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --system-libs --libs core orcjit native` -o toy + $(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++11 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp $(LLVM_LDFLAGS) .PHONY: clean clean: