aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.include
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2013-09-06 17:09:55 -0700
committerJeff Garzik <jgarzik@bitpay.com>2013-09-06 17:09:55 -0700
commit15fd245b9a4754485d1a272acce53bcf3290839f (patch)
tree95187b718dfe8cb7c4310fffb75f298637de1da5 /src/Makefile.include
parent495242c1adff8832d7d30b920aa71f31dd63a2a6 (diff)
parent35b8af92265ed74de63c3818e5290c27b3f35df2 (diff)
Merge pull request #2943 from theuni/autotools-final
Autotools buildsystem
Diffstat (limited to 'src/Makefile.include')
-rw-r--r--src/Makefile.include48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/Makefile.include b/src/Makefile.include
new file mode 100644
index 0000000000..231888e49f
--- /dev/null
+++ b/src/Makefile.include
@@ -0,0 +1,48 @@
+.PHONY: FORCE
+
+LIBBITCOIN=$(top_builddir)/src/libbitcoin.a
+LIBLEVELDB=$(top_builddir)/src/leveldb/libleveldb.a
+LIBMEMENV=$(top_builddir)/src/leveldb/libmemenv.a
+LIBBITCOINQT=$(top_builddir)/src/qt/libbitcoinqt.a
+
+$(LIBBITCOIN):
+ $(MAKE) -C $(top_builddir)/src $(@F)
+
+$(LIBLEVELDB) $(LIBMEMENV):
+ $(MAKE) -C $(top_builddir)/src leveldb/$(@F)
+
+$(LIBBITCOINQT):
+ $(MAKE) -C $(top_builddir)/src/qt $(@F)
+
+.mm.o:
+ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $<
+
+.rc.o:
+ @test -f $(WINDRES) && $(WINDRES) -i $< -o $@ || \
+ echo error: could not build $@
+
+ui_%.h: %.ui
+ @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
+ @test -f $(UIC) && $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@
+ $(SED) -i.bak -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ && rm $(abs_builddir)/$@.bak
+ $(SED) -i.bak -e '/^\*\*.*by:/d' $(abs_builddir)/$@ && rm $(abs_builddir)/$@.bak
+
+%.moc: %.cpp
+ $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
+ $(SED) -i.bak -e '/^\*\*.*Created:/d' $@ && rm $@.bak
+ $(SED) -i.bak -e '/^\*\*.*by:/d' $@ && rm $@.bak
+
+moc_%.cpp: %.h
+ $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
+ $(SED) -i.bak -e '/^\*\*.*Created:/d' $@ && rm $@.bak
+ $(SED) -i.bak -e '/^\*\*.*by:/d' $@ && rm $@.bak
+
+%.qm: %.ts
+ @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
+ @test -f $(LRELEASE) && $(LRELEASE) $(abs_srcdir)/$< -qm $(abs_builddir)/$@ || \
+ echo error: could not build $(abs_builddir)/$@
+
+%.pb.cc %.pb.h: %.proto
+ test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) || \
+ echo error: could not build $@