aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh62
1 files changed, 55 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index 8ff422e..0ce4ae3 100755
--- a/build.sh
+++ b/build.sh
@@ -1,14 +1,62 @@
DEBUG="-g -ggdb -fno-inline"
-cd ./brep; cli --generate-file-scanner --suppress-usage --hxx-suffix "" \
- --option-prefix "" ./options.cli; cd ..
+cd ./brep
-cd ./brep; odb -d pgsql --std c++11 --generate-query --generate-schema \
+echo "odb package"
+
+odb -d pgsql --std c++11 --generate-query --generate-schema \
--odb-epilogue '#include <brep/wrapper-traits>' \
--hxx-prologue '#include <brep/wrapper-traits>' \
-I .. -I ../../libbpkg -I ../../libbutl \
- package; cd ..
+ --hxx-suffix "" --include-with-brackets \
+ --include-prefix brep --guard-prefix BREP \
+ package
+e=$?
+if test $e -ne 0; then exit $e; fi
+
+echo "g++ libbrep.so"
+
+s="package.cxx package-odb.cxx"
+
+g++ -shared $DEBUG -std=c++11 -I.. -I../../libbpkg \
+ -I../../libbutl -L../../libbpkg/bpkg -L../../libbutl/butl \
+ -fPIC -o libbrep.so $s -lbpkg -lbutl -lodb-pgsql -lodb
+
+echo "cli brep-apache options"
+
+cli --include-with-brackets --include-prefix brep --hxx-suffix "" \
+ --guard-prefix BREP --generate-file-scanner --suppress-usage ./options.cli
+
+echo "g++ libbrep-apache.so"
+
+s="search.cxx view.cxx module.cxx diagnostics.cxx services.cxx options.cxx \
+../web/apache/request.cxx ../web/apache/service.cxx"
+
+g++ -shared $DEBUG -std=c++11 -I. -I/usr/include/apr-1 -I/usr/include/httpd \
+ -I.. -I../../libbpkg -I../../libbutl -L. -L../../libbpkg/bpkg \
+ -fPIC -o libbrep-apache.so $s -lbrep -lbpkg -lodb-pgsql -lodb
+
+cd ../loader
+
+echo "cli loader options"
+
+cli --hxx-suffix "" ./options.cli
+
+echo "g++ brep-loader"
+
+s="loader.cxx options.cxx"
+
+g++ $DEBUG -std=c++11 -I. -I.. -I../../libbpkg \
+ -I../../libbutl -L../brep -L../../libbpkg/bpkg -L../../libbutl/butl \
+ -o brep-loader $s -lbrep -lbpkg -lbutl -lodb-pgsql -lodb
+
+cd ../tests/loader
+
+echo "g++ tests/loader"
+
+s="driver.cxx"
-g++ -shared $DEBUG -std=c++11 -I. -I/usr/include/apr-1 -I ../libbpkg \
- -I ../libbutl -L ../libbpkg/bpkg \
- -fPIC -o libbrep.so `find . -name '*.cxx'` -lbpkg -lodb-pgsql -lodb
+g++ $DEBUG -std=c++11 -I. -I../.. -I../../../libbpkg \
+ -I../../../libbutl -L../../brep -L../../../libbpkg/bpkg \
+ -L../../../libbutl/butl \
+ -o driver $s -lbrep -lbpkg -lbutl -lodb-pgsql -lodb