Revision ac026fa5ed39aa62ced29206061424036d143c17 authored by Ben Goodrich on 13 August 2014, 15:43:55 UTC, committed by Ben Goodrich on 13 August 2014, 15:43:55 UTC
Build is probably very broken at the moment
1 parent 0f69d55
Raw File
libstan
LIBSTAN_OFILES = bin/stan/agrad/rev/var_stack.o
bin/libstan.a : $(LIBSTAN_OFILES)
	@mkdir -p $(dir $@)
	$(AR) -rs bin/libstan.a $(LIBSTAN_OFILES)

TEMPLATE_INSTANTIATION := $(shell find src/stan/gm -type f -name '*_inst.cpp')
TEMPLATE_INSTANTIATION += $(shell find src/stan/gm -type f -name '*_def.cpp')
TEMPLATE_INSTANTIATION := $(TEMPLATE_INSTANTIATION: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) $<



##
# Generate dependencies for libraries
##
ifneq (,$(filter-out clean%,$(MAKECMDGOALS)))
  -include $(addsuffix .d,$(basename $(LIBSTAN_OFILES)))
  -include $(addsuffix .d,$(basename $(TEMPLATE_INSTANTIATION)))
endif
back to top