# Build pomdp-solve

.PHONY: all clean

## We have to pre-clean here, to clean up between architectures:
## INSTALL only cleans src/*.o src/*$(SHLIB_EXT) for each arch
## and does not call the clean target below!

all: clean
	@echo "building executable"
	(cd pomdp-solve && CXX="$(CXX)" CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS)" CXXFLAGS="$(CXXFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" $(MAKE))

# report used compiler version in the installation log used by CRAN
clean:
	@echo "using C compiler: '`$(CC) --version | head -1`'" || true
	@echo "precleaning"
	(cd pomdp-solve && CXX="$(CXX)" CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS)" CXXFLAGS="$(CXXFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" $(MAKE) clean)


