aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-09-16 15:39:48 -0400
committerDavid Robillard <d@drobilla.net>2022-09-16 22:31:06 -0400
commit49dab5622b31421eb6af84eae376d73fae1cd4a0 (patch)
tree86290707551320ab35952bccc11c66df05714b26 /Makefile
parent342a22b6d75597ee22c195b60607402e3ed028b2 (diff)
downloadchilbert-49dab5622b31421eb6af84eae376d73fae1cd4a0.tar.gz
chilbert-49dab5622b31421eb6af84eae376d73fae1cd4a0.tar.bz2
chilbert-49dab5622b31421eb6af84eae376d73fae1cd4a0.zip
Switch to meson build system
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile99
1 files changed, 0 insertions, 99 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 3a8b625..0000000
--- a/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-#################
-# Configuration #
-#################
-
-# User variables
-DEBUG ?= 0
-TEST ?= 0
-
-prefix ?= /usr/local
-includedir ?= $(prefix)/include
-bindir ?= $(prefix)/bin
-
-# Wipe user flags if DEBUG is on
-ifeq ($(DEBUG), 1)
-CXXFLAGS = -O0 -g
-endif
-
-# Append mandatory flags
-CXXFLAGS += -I. -std=c++14
-
-# Set strict debugging flags for known compilers
-ifeq ($(DEBUG), 1)
-
-ifeq ($(findstring clang,$(CXX)),clang)
- CXXFLAGS += -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic
-else ifeq ($(findstring g++,$(CXX)),g++)
- CXXFLAGS += -ftree-vrp -ftrapv -Waddress -Wall -Warray-bounds=2 -Wbool-compare -Wc++14-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wchkp -Wclobbered -Wcomment -Wconditionally-supported -Wconversion -Wcoverage-mismatch -Wdate-time -Wdelete-incomplete -Wdisabled-optimization -Wdouble-promotion -Wduplicated-cond -Wempty-body -Wenum-compare -Werror=pedantic -Wextra -Wfloat-conversion -Wfloat-equal -Wformat -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Wformat=2 -Wframe-address -Whsa -Wignored-attributes -Wignored-qualifiers -Winit-self -Winline -Winvalid-memory-model -Winvalid-pch -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wno-aggressive-loop-optimizations -Wno-attributes -Wno-builtin-macro-redefined -Wno-cpp -Wno-deprecated -Wno-deprecated-declarations -Wno-div-by-zero -Wno-endif-labels -Wno-format-contains-nul -Wno-format-extra-args -Wno-free-nonheap-object -Wno-int-to-pointer-cast -Wno-invalid-offsetof -Wno-multichar -Wno-overflow -Wno-pedantic-ms-format -Wno-pragmas -Wno-return-local-addr -Wno-scalar-storage-order -Wno-undef -Wno-unused-result -Wnonnull -Wnonnull-compare -Wnormalized -Wnull-dereference -Wodr -Wopenmp-simd -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wparentheses -Wpedantic -Wplacement-new=2 -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wshift-overflow -Wshift-overflow=2 -Wsign-compare -Wsign-conversion -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstack-protector -Wstrict-aliasing -Wstrict-overflow -Wsubobject-linkage -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wsuggest-override -Wswitch -Wswitch-bool -Wswitch-default -Wswitch-enum -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-const-variable -Wunused-const-variable=2 -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-value -Wunused-variable -Wuseless-cast -Wvariadic-macros -Wvector-operation-performance -Wvla -Wvolatile-register-var -Wwrite-strings -Wzero-as-null-pointer-constant -fstrict-aliasing -fstrict-overflow -pedantic-errors
-else
-$(info warning: Unknown compiler, not setting strict debugging flags)
-$(info )
-endif
-
-endif # DEBUG
-
-
-###############
-# Build Rules #
-###############
-
-HEADERS = $(wildcard chilbert/*.hpp) $(wildcard chilbert/*.ipp)
-DETAIL_HEADERS = $(wildcard chilbert/detail/*.hpp)
-TESTS = test/test_bitvec test/test_gray_code_rank test/test_hilbert
-BENCHMARKS = test/bench_bitvec test/bench_hilbert
-PROGS = bin/chilbert_obj bin/chilbert_svg
-
-ALL_HEADERS = $(HEADERS) $(DETAIL_HEADERS)
-PROG_NAMES = $(subst bin/,,$(PROGS))
-
-all: $(PROGS)
-
-tests: $(TESTS)
-
-benchmarks: $(BENCHMARKS)
-
-test/%: test/%.cpp $(ALL_HEADERS)
- $(CXX) $(CXXFLAGS) -o $@ $@.cpp
-
-test/test_hilbert: test/test_hilbert.cpp $(ALL_HEADERS)
- $(CXX) $(CXXFLAGS) -lgmp -lgmpxx -o $@ $@.cpp
-
-bin/%: bin/%.cpp $(ALL_HEADERS)
- $(CXX) $(CXXFLAGS) -o $@ $@.cpp
-
-
-##################
-# Forced Targets #
-##################
-
-FORCE:
-
-clean:
- rm -f $(PROGS) $(TESTS) $(BENCHMARKS)
-
-%.run: %
- $*
-
-test: tests $(addsuffix .run, $(TESTS)) FORCE
-
-bench: $(BENCHMARKS)
- mkdir -p benchmarks
- cd benchmarks && ../test/bench_bitvec
- cd benchmarks && ../test/bench_hilbert
- cd benchmarks && ./plot.py
-
-install: FORCE
- install -d $(DESTDIR)$(includedir)/chilbert/
- install -d $(DESTDIR)$(includedir)/chilbert/detail/
- install -d $(DESTDIR)$(bindir)/
-
- install -m 755 -t $(DESTDIR)$(includedir)/chilbert/ $(HEADERS)
- install -m 755 -t $(DESTDIR)$(includedir)/chilbert/detail/ $(DETAIL_HEADERS)
- install -m 755 -t $(DESTDIR)$(bindir)/ $(PROGS)
-
-uninstall: FORCE
- rm -f $(subst bin/,$(DESTDIR)$(bindir)/,$(PROGS))
- rm -f $(subst chilbert/,$(DESTDIR)$(includedir)/chilbert/,$(ALL_HEADERS))
-
- -rmdir $(DESTDIR)$(bindir)/
- -rmdir -p $(DESTDIR)$(includedir)/chilbert/detail/