PKG_CPPFLAGS=-I.
PKG_CXXFLAGS=$(SHLIB_OPENMP_CXXFLAGS)
#PKG_CXXFLAGS=$(SHLIB_OPENMP_CXXFLAGS) -O3 -march=native -mtune=native
PKG_LIBS=$(SHLIB_OPENMP_CXXFLAGS) `"$(R_HOME)/bin/Rscript" -e "RcppThread::LdFlags()"`

SOURCES=RcppExports.cpp \
	algebra.cpp \
	dig.cpp \
	parse_condition.cpp \
	triangle.cpp \
	raisedcos.cpp \
	which_antichain.cpp \
	test-runner.cpp \
	test-antichain-Condition.cpp \
	test-antichain-Node.cpp \
	test-antichain-Tree.cpp \
	test-dig-BinomialCoefficients.cpp \
	test-dig-BitChain.cpp \
	test-dig-ChainCollection.cpp \
	test-dig-Config.cpp \
	test-dig-FloatChain.cpp \
	test-dig-FubitChain.cpp \
	test-dig-TautologyTree.cpp

# Obtain the object files
OBJECTS=$(SOURCES:.cpp=.o)

# Make the shared object
all: $(SHLIB)

# Provide recipe to remove all objects
clean:
	@rm -f $(OBJECTS)
