Start to clean things up to get into a state usable by others.
[cl-llvm.git] / src / Makefile
blob379978e5f27bc32e8360eb9a5fad9dd4e9f920e0
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)
18 all: build
20 build: cl-llvm.so
21 bindings: $(BINDINGS_FILES)
23 generated/%.lisp: %.i
24 $(SWIG) $(SWIGFLAGS) -o $@ -module $* $<
26 llvm-extras.o: llvm-extras.cpp
28 cl-llvm.so: llvm-extras.o
29 $(LINKER) -shared -o $@ $(LDFLAGS) $^ $(LLVM_LIBS)
31 clean:
32 rm $(BINDINGS_FILES) cl-llvm.so llvm-extras.o