Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 126 lines (109 sloc) 3.475 kB
16ba2af @msporny Added first version of dependency tracking build script using common
msporny authored
1 # The top-level Makefile that is used to build
2
4d5b314 @davidlehn Move portmap from bitmunk to dbcore.
davidlehn authored
3 EXECUTABLE_SUBDIRS := \
4 cpp/apps/portmap \
2da31b1 @davidlehn Changed Tester and tests to modules.
davidlehn authored
5 cpp/apps/monarch \
6 cpp/apps/tester \
4d5b314 @davidlehn Move portmap from bitmunk to dbcore.
davidlehn authored
7 cpp/tests
8
9 SUBDIRS := \
10 cpp/3rdparty \
11 cpp/rt \
12 cpp/util \
13 cpp/io \
14 cpp/compress \
15 cpp/logging \
16 cpp/modest \
17 cpp/fiber \
18 cpp/crypto \
19 cpp/event \
20 cpp/net \
21 cpp/http \
4aec888 @dlongley Fixed build order.
dlongley authored
22 cpp/data \
4d5b314 @davidlehn Move portmap from bitmunk to dbcore.
davidlehn authored
23 cpp/config \
24 cpp/sphinx \
25 cpp/validation \
26 cpp/sql \
27 cpp/sqlite3 \
28 cpp/mail \
29 cpp/mysql \
30 cpp/upnp \
44f9afc @dlongley Added monarch-level MicroKernel.
dlongley authored
31 cpp/kernel \
4d5b314 @davidlehn Move portmap from bitmunk to dbcore.
davidlehn authored
32 cpp/app \
33 cpp/test \
34 $(EXECUTABLE_SUBDIRS)
e5e9d8f @msporny Added ability to build all libraries using the new dependency-tracking
msporny authored
35
ccef296 @davidlehn Updated Debian packaging.
davidlehn authored
36 INSTALL_LIBRARIES := \
4995dec @msporny Changed all libdb... instances to libmo...
msporny authored
37 dist/lib/libmoapp.so \
38 dist/lib/libmoconfig.so \
39 dist/lib/libmocompress.so \
40 dist/lib/libmocrypto.so \
41 dist/lib/libmodata.so \
42 dist/lib/libmoevent.so \
43 dist/lib/libmofiber.so \
44 dist/lib/libmoio.so \
44f9afc @dlongley Added monarch-level MicroKernel.
dlongley authored
45 dist/lib/libmokernel.so \
4995dec @msporny Changed all libdb... instances to libmo...
msporny authored
46 dist/lib/libmologging.so \
47 dist/lib/libmomail.so \
48 dist/lib/libmomodest.so \
49 dist/lib/libmonet.so \
50 dist/lib/libmohttp.so \
51 dist/lib/libmort.so \
52 dist/lib/libmosql.so \
53 dist/lib/libmosqlite3.so \
54 dist/lib/libmomysql.so \
55 dist/lib/libmoupnp.so \
56 dist/lib/libmoutil.so \
57 dist/lib/libmosphinx.so \
58 dist/lib/libmovalidation.so
823055a @msporny Fixed Debian package build process to generate the libdbcore3 package
msporny authored
59
f1c1fb7 @davidlehn Add verbose-commands make target.
davidlehn authored
60 ifndef PRINT_DIRECTORIES
61 PRINT_DIRECTORIES_OPTS = --no-print-directory -s
6936b86 @msporny Fixed the 'clean' build rule such that any .P dependencies are no lon…
msporny authored
62 endif
f1c1fb7 @davidlehn Add verbose-commands make target.
davidlehn authored
63 ifdef PRINT_COMMANDS
64 PRINT_COMMANDS_OPTS = PRINT_COMMANDS=$(PRINT_COMMANDS)
65 endif
e38065f @msporny Updated build to use the maximum number of CPU cores when building.
msporny authored
66 # Maximum load is the number of CPU cores + 1
67 MAX_LOAD = $(shell (cat /proc/cpuinfo | grep -i ^processor && echo processor) | wc -l)
68 MAKE_JOB_OPTS ?= -j -l $(MAX_LOAD).0
f1c1fb7 @davidlehn Add verbose-commands make target.
davidlehn authored
69
b93fc4b @davidlehn Port to MacOS.
davidlehn authored
70 MAKE_CMD = $(PRINT_COMMANDS_OPTS) $(MAKE) $(MAKE_JOB_OPTS) $(PRINT_DIRECTORIES_OPTS)
f1c1fb7 @davidlehn Add verbose-commands make target.
davidlehn authored
71 MAKE_DIR = $(PRINT_COMMANDS_OPTS) $(MAKE_CMD) -C $(dir)
6936b86 @msporny Fixed the 'clean' build rule such that any .P dependencies are no lon…
msporny authored
72
2735505 @davidlehn Add clean-docs target.
davidlehn authored
73 .PHONY: all verbose clean test internal-docs clean-docs
16ba2af @msporny Added first version of dependency tracking build script using common
msporny authored
74
2d3be90 @msporny Fixed a number of symbolic link issues for the Windows build.
msporny authored
75 all:
060ca9e @msporny Fixed all restructuring build/testing bugs, commiting final build scr…
msporny authored
76 @$(foreach dir,$(SUBDIRS),IGNORE_DEPENDENCIES=true $(MAKE_DIR) build-headers &&) true
38d0510 @msporny Fixed several more build bugs when cross-compiling for windows and
msporny authored
77 @$(foreach dir,$(SUBDIRS),$(MAKE_DIR) build-objects build-libraries &&) true
4d5b314 @davidlehn Move portmap from bitmunk to dbcore.
davidlehn authored
78 @$(foreach dir,$(EXECUTABLE_SUBDIRS),$(MAKE_DIR) build-executables &&) true
e5e9d8f @msporny Added ability to build all libraries using the new dependency-tracking
msporny authored
79
80 clean:
931e018 @msporny Centralized build directory to dbcore/build, instead of having per
msporny authored
81 @rm -rf build
6940733 @msporny Split the dbtest library and unit tests into separate directories.
msporny authored
82 @rm -rf dist
6936b86 @msporny Fixed the 'clean' build rule such that any .P dependencies are no lon…
msporny authored
83 @echo "Cleaned all objects and libraries."
9a5f87f @davidlehn Add test target.
davidlehn authored
84
b93fc4b @davidlehn Port to MacOS.
davidlehn authored
85 # Note: When building for multiple archs this will see all the tests and
86 # will likely fail for non-current archs. This method is used since
87 # it will work for single arch builds and is difficult to know which
88 # arch to specify otherwise.
9a5f87f @davidlehn Add test target.
davidlehn authored
89 test: all
6940733 @msporny Split the dbtest library and unit tests into separate directories.
msporny authored
90 cpp/tests/run-unit-tests.py
3798238 @msporny Added ability to generate API documentation for DB Core.
msporny authored
91
2735505 @davidlehn Add clean-docs target.
davidlehn authored
92 clean-docs:
3798238 @msporny Added ability to generate API documentation for DB Core.
msporny authored
93 rm -rf docs/cpp-api
2735505 @davidlehn Add clean-docs target.
davidlehn authored
94
95 internal-docs: clean-docs
3798238 @msporny Added ability to generate API documentation for DB Core.
msporny authored
96 mkdir -p docs/cpp-api
97 doxygen setup/docs.doxygen
6936b86 @msporny Fixed the 'clean' build rule such that any .P dependencies are no lon…
msporny authored
98
99 verbose:
100 PRINT_DIRECTORIES=true $(MAKE) all
23cd8c2 @davidlehn Add valgrind make target and suppressions.
davidlehn authored
101
f1c1fb7 @davidlehn Add verbose-commands make target.
davidlehn authored
102 verbose-commands:
103 PRINT_DIRECTORIES=true PRINT_COMMANDS=true $(MAKE) all
104
23cd8c2 @davidlehn Add valgrind make target and suppressions.
davidlehn authored
105 valgrind:
9fe76af @msporny Replaced all 'dbcore' instances with 'monarch'.
msporny authored
106 ./monarch-valgrind dist/bin/run-unit-tests
823055a @msporny Fixed Debian package build process to generate the libdbcore3 package
msporny authored
107
108 packages:
109 @echo "Building Debian packages..."
110 @rm -f debian
52d3e0a @msporny Added build rule to remove old packages from the installers/packages
msporny authored
111 @rm -f installers/packages/*
823055a @msporny Fixed Debian package build process to generate the libdbcore3 package
msporny authored
112 @ln -s installers/debian debian
113 @dpkg-buildpackage -us -uc -rfakeroot -b
114 @echo "Moving packages to installers/packages..."
9fe76af @msporny Replaced all 'dbcore' instances with 'monarch'.
msporny authored
115 @rm ../monarch3*changes
823055a @msporny Fixed Debian package build process to generate the libdbcore3 package
msporny authored
116 @mkdir -p installers/packages
9fe76af @msporny Replaced all 'dbcore' instances with 'monarch'.
msporny authored
117 @mv ../monarch3*deb installers/packages
823055a @msporny Fixed Debian package build process to generate the libdbcore3 package
msporny authored
118
119 install:
120 @mkdir -p $(PREFIX)/usr/lib
9fe76af @msporny Replaced all 'dbcore' instances with 'monarch'.
msporny authored
121 @echo "Installing Monarch libraries in $(PREFIX)/usr/lib..."
823055a @msporny Fixed Debian package build process to generate the libdbcore3 package
msporny authored
122 @$(foreach lib,$(INSTALL_LIBRARIES),install -m 644 $(lib) $(PREFIX)/usr/lib/$(notdir $(lib)).@FULL_VERSION@ &&) true
0701a37 @davidlehn Updated build system to single platform mode.
davidlehn authored
123 @$(foreach lib,$(INSTALL_LIBRARIES),ln -s $(notdir $(lib)).@FULL_VERSION@ $(PREFIX)/usr/lib/$(notdir $(lib)).@FULL_DOTTED_VERSION@ &&) true
124 @$(foreach lib,$(INSTALL_LIBRARIES),ln -s $(notdir $(lib)).@FULL_VERSION@ $(PREFIX)/usr/lib/$(notdir $(lib)).@MONARCH_VERSION_MAJOR@ &&) true
823055a @msporny Fixed Debian package build process to generate the libdbcore3 package
msporny authored
125 @$(foreach lib,$(INSTALL_LIBRARIES),ln -s $(notdir $(lib)).@FULL_VERSION@ $(PREFIX)/usr/lib/$(notdir $(lib)) &&) true
Something went wrong with that request. Please try again.