SAMPLE=./sample/about-bezos.md ROOT_DIR=$(dir $(firstword $(MAKEFILE_LIST))) all: build reset: ifeq '$(OS)' 'Windows_NT' powershell -executionpolicy bypass .\scripts\reset_build.ps1 else sh -x ./scripts/reset_build.sh endif %.cpp : %.rl ragel -o $@ $< build: $(ROOT_DIR)/src/md_parser.cpp meson compile -j 10 -C $(ROOT_DIR)/builddir release_build: meson --wipe builddir -Db_ndebug=true --buildtype release meson compile -j 10 -C builddir debug_build: meson setup --wipe builddir -Db_ndebug=true --buildtype debugoptimized meson compile -j 10 -C builddir run: build ifeq '$(OS)' 'Windows_NT' powershell "cp ./builddir/bezos.exe ." ./bezos ${SAMPLE} else ./builddir/bezos ${SAMPLE} endif debug: build gdb --nx -x .gdbinit --ex run --args builddir/bezos debug_run: build gdb --nx -x .gdbinit --batch --ex run --ex bt --ex q --args builddir/bezos ${SAMPLE} clean: meson compile --clean -C builddir test: build ./builddir/runtests -e debug_test: build gdb --nx -x .gdbinit --ex run --args builddir/runtests -e win_installer: powershell 'start "C:\Program Files (x86)\solicus\InstallForge\bin\ifbuilderenvx86.exe" scripts\win_installer.ifp' coverage_report: powershell 'scripts/coverage_report.ps1'