aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-03-06 19:39:32 +0000
committerDavid Robillard <d@drobilla.net>2009-03-06 19:39:32 +0000
commite74dd3739a20349005add6507d6ef191ea60b8fb (patch)
treeaf052f3272e65783c83c6c4a59b896b9d7d5db18
parentc49d6fabbd295c3d0b2a29c4e68eb7a358e4f3a9 (diff)
downloadresp-e74dd3739a20349005add6507d6ef191ea60b8fb.tar.gz
resp-e74dd3739a20349005add6507d6ef191ea60b8fb.tar.bz2
resp-e74dd3739a20349005add6507d6ef191ea60b8fb.zip
Replace build.sh with a Makefile. Parallel building FTW.
git-svn-id: http://svn.drobilla.net/resp/tuplr@59 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r--Makefile14
-rwxr-xr-xbuild.sh5
2 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..85bf1ac
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+LLVM_CXXFLAGS=`llvm-config --cppflags core jit native`
+LLVM_LDFLAGS=`llvm-config --ldflags --libs core jit native`
+
+CXXFLAGS=-O0 -g -Wall -Wextra -Wno-unused-parameter $(LLVM_CXXFLAGS)
+LDFLAGS=$(LLVM_LDFLAGS) -lm
+
+tuplr: tuplr.o typing.o tuplr_llvm.o
+ g++ -o $@ $^ $(LDFLAGS)
+
+%.o: %.cpp
+ g++ $(CXXFLAGS) -o $@ -c $<
+
+clean:
+ rm -f tuplr *.o
diff --git a/build.sh b/build.sh
deleted file mode 100755
index 66fc830..0000000
--- a/build.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-CXXFLAGS="-O0 -g -Wall -Wextra -Wno-unused-parameter"
-
-g++ $CXXFLAGS tuplr.cpp typing.cpp tuplr_llvm.cpp `llvm-config --cppflags --ldflags --libs core jit native` -lm -o tuplr
-