summaryrefslogtreecommitdiff
path: root/bootstrap.sh
blob: 052d8b7809ff5ad7aa05b0d7ff80e93de2bc1e3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -e

: ${CXX:=g++}
: ${BUILDDIR:=build}
CXX=$(which $CXX)

echo "Bootstrapping..."
$CXX -std=c++20 -Wall -O3 -Isrc -pthread src/bootstrap.cc ctor.cc -o ctor
./ctor
$CXX -std=c++20 -Wall -O3 -Isrc -pthread ctor.cc test/ctor.cc -L$BUILDDIR -lctor -o ctor
./ctor configure --ctor-includedir=src --ctor-libdir=$BUILDDIR --build-dir=$BUILDDIR
echo "Done. Now run ./ctor to (re)build."