Raw File
################################################################################
# libstanc build rules

STANC_TEMPLATE_INSTANTIATION_CPP := $(shell find src/stan/lang -type f -name '*_inst.cpp') $(shell find src/stan/lang -type f -name '*_def.cpp')
STANC_TEMPLATE_INSTANTIATION := $(STANC_TEMPLATE_INSTANTIATION_CPP:src/%.cpp=test/%.o)

test/libstanc.a : $(STANC_TEMPLATE_INSTANTIATION)
	@mkdir -p $(dir $@)
	$(AR) -rs $@ $^


$(STANC_TEMPLATE_INSTANTIATION) : O = $(O_STANC)
$(STANC_TEMPLATE_INSTANTIATION) : test/%.o : src/%.cpp
	@mkdir -p $(dir $@)
	$(COMPILE.cpp) $(OUTPUT_OPTION) $<

ifneq ($(filter test/libstanc.a $(STANC_TEMPLATE_INSTANTIATION),$(MAKECMDGOALS)),)
-include $(patsubst %.cpp,%.d,$(STANC_TEMPLATE_INSTANTIATION_CPP))
endif
back to top