I just stumbled on this problem. I tried to write a very basic Makefile target:
Makefile
core: myprogram ulimit -c 10000 ./myprogram
You can say:
core: myprogram $(shell /bin/bash -c "ulimit -c 10000") ./myprogram $(shell /bin/bash -c "ulimit -c 0")