https://github.com/stan-dev/stan
Raw File
Tip revision: c13ebc71e464d9906e9a475e4a9a4f50c56a1a3d authored by Daniel Lee on 17 October 2016, 16:06:57 UTC
Adding a make target for testing the manual programs
Tip revision: c13ebc7
libstan
TEMPLATE_INSTANTIATION_CPP := $(shell find src/stan/lang -type f -name '*_inst.cpp') $(shell find src/stan/lang -type f -name '*_def.cpp')
TEMPLATE_INSTANTIATION := $(TEMPLATE_INSTANTIATION_CPP:src/%.cpp=bin/%.o)

bin/libstanc.a : $(TEMPLATE_INSTANTIATION)
	@mkdir -p $(dir $@)
	$(AR) -rs bin/libstanc.a $(TEMPLATE_INSTANTIATION)

$(TEMPLATE_INSTANTIATION) : bin/%.o : src/%.cpp
	@mkdir -p $(dir $@)
	$(COMPILE.c) -O$(O_STANC) $(OUTPUT_OPTION) $<

back to top