summaryrefslogtreecommitdiff
path: root/bootstrap.sh
blob: 9e8cdca0690b09a749b2ffc3ea7113baf1c4e68e (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 test/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."