Wrap more stuff, move some things around.
[cl-llvm.git] / src / Makefile
blob5bf54b726575341e55f0c4688bffdfd2fcfd3ec2
1 #LLVM_HEADERS=/usr/include/
2 SWIG=swig
3 SWIGFLAGS=-cffi -noswig-lisp -generate-typedef -I$(LLVM_HEADERS)
5 CFLAGS=$(shell llvm-config --cflags)
6 CXXFLAGS=$(CFLAGS)
7 LDFLAGS=$(shell llvm-config --ldflags)
8 LINKER=g++
9 LLVM_LIBS=-Wl,--whole-archive $(shell llvm-config --libs core jit interpreter native asmparser) -Wl,--no-whole-archive
11 BINDINGS_FILES=$(addprefix generated/,\
12 core.lisp \
13 analysis.lisp \
14 execution-engine.lisp \
15 target.lisp \
16 transforms-scalar.lisp \
17 transforms-ipo.lisp \
18 llvm-extras.lisp)
20 all: build
22 build: cl-llvm.so
23 bindings: $(BINDINGS_FILES)
25 generated/%.lisp: %.i
26 $(SWIG) $(SWIGFLAGS) -o $@ -module $* $<
28 llvm-extras.o: llvm-extras.cpp
30 cl-llvm.so: llvm-extras.o
31 $(LINKER) -shared -o $@ $(LDFLAGS) $^ $(LLVM_LIBS)
33 clean:
34 rm $(BINDINGS_FILES) cl-llvm.so llvm-extras.o