LLVM_CXXFLAGS=`llvm-config --cppflags core jit native` LLVM_LDFLAGS=`llvm-config --ldflags --libs core jit native` COMMON_FLAGS=-Wextra -Wno-unused-parameter COMMON_FLAGS+=-O0 -g #COMMON_FLAGS+=-O2 -march=nocona -fomit-frame-pointer CFLAGS=$(COMMON_FLAGS) -std=c99 CXXFLAGS=$(COMMON_FLAGS) $(LLVM_CXXFLAGS) LDFLAGS=$(LLVM_LDFLAGS) -lm all: builddir build/tuplr mkdir -p build builddir: mkdir -p build OBJECTS = \ build/constrain.o \ build/cps.o \ build/gc.o \ build/gclib.so \ build/lex.o \ build/llvm.so \ build/parse.o \ build/pprint.o \ build/repl.o \ build/tuplr.o \ build/unify.o \ build/tlsf.o build/tuplr: $(OBJECTS) g++ -o $@ $^ $(LDFLAGS) build/%.o: src/%.cpp src/tuplr.hpp g++ $(CXXFLAGS) -o $@ -c $< build/tlsf.o: src/tlsf.c src/tlsf.h gcc $(CFLAGS) -o $@ -c $< build/%.so: src/%.cpp src/tuplr.hpp g++ -fPIC -dPIC -shared $(CXXFLAGS) -o $@ $< clean: rm -rf build check: ./test.sh doc: doxygen ./tuplr.dox