12 lines · plain
1C_SOURCES := main.c2LD_EXTRAS := -L. -Wl,-delay_library,libfoo.dylib3 4.PHONY: build-libfoo5all: build-libfoo a.out6 7include Makefile.rules8 9build-libfoo: foo.c10 "$(MAKE)" -f $(MAKEFILE_RULES) \11 DYLIB_C_SOURCES=foo.c DYLIB_NAME=foo DYLIB_ONLY=YES12