Revision 4d333d87cf158044262e3650d0c2b3e8dc743a25 authored by andre on 21 March 2019, 01:44:32 UTC, committed by andre on 21 March 2019, 01:44:32 UTC
This reverts commit ab58306dc91ca1fa35d8e7bc82c7a741cf58a714.
1 parent ab58306
Raw File
libstanc
################################################################################
# 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