aboutsummaryrefslogtreecommitdiff
path: root/odb/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-03-09 09:59:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-03-09 09:59:54 +0200
commit82208a8315b3d2ec355e3329aa588eea2b064aa6 (patch)
treefa401388211ccba8d0cc524aa82ada15c195638e /odb/makefile
parentbecc45a0a1faf276382f26044e46927ecbb2c75a (diff)
Reorganize the directory structure
Diffstat (limited to 'odb/makefile')
-rw-r--r--odb/makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/odb/makefile b/odb/makefile
new file mode 100644
index 0000000..9a5fab9
--- /dev/null
+++ b/odb/makefile
@@ -0,0 +1,23 @@
+GXX=g++-4.5
+PLUGIN_INC := $(shell $(GXX) -print-file-name=plugin)
+
+src := plugin.cxx
+obj := $(src:.cxx=.o)
+
+odb.so: $(obj)
+ $(GXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS)
+
+%.o: %.cxx
+ $(GXX) -c -o $@ -fPIC $(CPPFLAGS) -I$(PLUGIN_INC)/include $(CXXFLAGS) $<
+
+# Test.
+#
+.PHONY: test
+test: odb.so test.cxx
+ $(GXX) -x c++ -S -fplugin=./odb.so test.cxx
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f *.o odb.so