1C_SOURCES := main.c 2LD_EXTRAS := -L. -Wl,-delay_library,libfoo.dylib 3 4.PHONY: build-libfoo 5all: build-libfoo a.out 6 7include Makefile.rules 8 9build-libfoo: foo.c 10 "$(MAKE)" -f $(MAKEFILE_RULES) \ 11 DYLIB_C_SOURCES=foo.c DYLIB_NAME=foo DYLIB_ONLY=YES 12