Make the "name" argument of LLVMBuild* an optional argument,
[cl-llvm.git] / src / Makefile
blobba06f9d90933eedc23c0e97725450d4efeef4f8c
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 ipo) -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 generated/core.lisp: core.i
29 $(SWIG) $(SWIGFLAGS) -o $@ -module core $<
30 sed 's/(cffi:defcfun/(wrap-defcfun/' -i generated/core.lisp
32 llvm-extras.o: llvm-extras.cpp
34 cl-llvm.so: llvm-extras.o
35 $(LINKER) -shared -o $@ $(LDFLAGS) $^ $(LLVM_LIBS)
37 clean:
38 rm $(BINDINGS_FILES) cl-llvm.so llvm-extras.o