Initial revision.
[cl-llvm.git] / Makefile
blob05e494fb8ea57fa92ecc689f0abe4270185cb3bf
1 all: cl-llvm.so
3 bindings:
4 swig -cffi -noswig-lisp -outdir src/generated -module core /usr/include/llvm-c/Core.h
5 swig -cffi -noswig-lisp -outdir src/generated -module analysis /usr/include/llvm-c/Analysis.h
6 swig -cffi -noswig-lisp -outdir src/generated -module execution-engine /usr/include/llvm-c/ExecutionEngine.h
7 swig -cffi -noswig-lisp -outdir src/generated -module target Target.i
8 swig -cffi -noswig-lisp -outdir src/generated -module transforms-scalar /usr/include/llvm-c/Transforms/Scalar.h
10 CFLAGS=$(shell llvm-config --cflags)
11 CXXFLAGS=$(CFLAGS)
12 LDFLAGS=$(shell llvm-config --ldflags)
13 LINKER=g++
15 LIBS=-Wl,--whole-archive $(shell llvm-config --libs core jit interpreter native asmparser) -Wl,--no-whole-archive
17 llvm-extras.o: llvm-extras.cpp
19 cl-llvm.so: llvm-extras.o
20 $(LINKER) -shared -o $@ $(LDFLAGS) $^ $(LIBS)