--- src/Makefile.orig 2018-05-15 08:33:08.000000000 -0700 +++ src/Makefile 2018-12-29 18:26:27.000000000 -0700 @@ -99,9 +99,9 @@ .PHONY: dirs tools .SECONDARY: -objs/libpbrt.a: $(LIBOBJS) - @echo "Building the core rendering library (libpbrt.a)" - @ar rcs $@ $(LIBOBJS) +objs/libpbrt.2.dylib: $(LIBOBJS) + @echo "Building the core rendering library (libpbrt.2.dylib)" + $(CXX) -dynamiclib -o $@ -current_version 2 -compatibility_version 2 -install_name __PREFIX__/lib/libpbrt.2.dylib $(sort $(LIBOBJS)) $(LIBS) objs/accelerators_%.o: accelerators/%.cpp @echo "Building object $@" @@ -171,11 +171,11 @@ @echo "Building object $@" @$(CXX) $(CXXFLAGS) -o $@ -c $< -bin/pbrt: objs/main_pbrt.o objs/libpbrt.a +bin/pbrt: objs/main_pbrt.o objs/libpbrt.2.dylib @echo "Linking $@" @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) -bin/%: objs/tools_%.o objs/libpbrt.a +bin/%: objs/tools_%.o objs/libpbrt.2.dylib @echo "Linking $@" @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)