Annotation For Makefile

Lines of Makefile from check-in 511419642c that are changed by the sequence of edits moving toward check-in f1d16a3958:

                         1: CPPFLAGS := -I. -DUSE_TCL_STUBS=1 -DXVFS_DEBUG $(XVFS_ADD_CPPFLAGS)
                         2: CFLAGS   := -fPIC -g3 -ggdb3 -Wall $(XVFS_ADD_CFLAGS)
                         3: LDFLAGS  := $(XVFS_ADD_LDFLAGS)
                         4: LIBS     := -ltclstub8.6
                         5: TCLSH    := tclsh
                         6: 
                         7: all: example.so example-client-server.so
                         8: 
                         9: example.c: $(shell find example -type f) $(shell find lib -type f) xvfs.c.rvt xvfs-create Makefile
                        10: 	./xvfs-create --directory example --name example > example.c.new
                        11: 	mv example.c.new example.c
                        12: 
                        13: example.o: example.c xvfs-core.h xvfs-core.c Makefile
                        14: 	$(CC) $(CPPFLAGS) -DXVFS_MODE_FLEXIBLE $(CFLAGS) -o example.o -c example.c
                        15: 
                        16: example.so: example.o Makefile
                        17: 	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o example.so example.o $(LIBS)
                        18: 
                        19: example-client.o: example.c xvfs-core.h Makefile
511419642c 2019-09-16   20: 	$(CC) $(CPPFLAGS) -DXVFS_MODE_CLIENT $(CFLAGS) -o example-client.o -c example.c
                        21: 
                        22: example-server.o: xvfs-core.h xvfs-core.c Makefile
                        23: 	$(CC) $(CPPFLAGS) -DXVFS_MODE_SERVER $(CFLAGS) -o example-server.o -c xvfs-core.c
                        24: 
                        25: example-client-server.so: example-client.o example-server.o Makefile
                        26: 	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o example-client-server.so example-client.o example-server.o $(LIBS)
                        27: 
                        28: # xvfs-create-standalone is a standalone (i.e., no external dependencies
                        29: # like lib/minirivet, xvfs-core.c, etc) version of "xvfs-create"
                        30: xvfs-create-standalone: $(shell find lib -type f) xvfs-create xvfs-core.c xvfs-core.h xvfs.c.rvt Makefile
                        31: 	rm -f xvfs-create-standalone.new xvfs-create-standalone
                        32: 	./xvfs-create --dump-tcl --remove-debug > xvfs-create-standalone.new
                        33: 	chmod +x xvfs-create-standalone.new
                        34: 	mv xvfs-create-standalone.new xvfs-create-standalone
                        35: 
                        36: test: example.so example-client-server.so Makefile
                        37: 	rm -f __test__.tcl
                        38: 	echo 'if {[catch { load $$::env(XVFS_SHARED_OBJECT) Xvfs_example; source //xvfs:/example/main.tcl }]} { puts stderr $$::errorInfo; exit 1 }; exit 0' > __test__.tcl
                        39: 	XVFS_SHARED_OBJECT=./example.so $(GDB) $(TCLSH) __test__.tcl $(TCL_TEST_ARGS)
                        40: 	XVFS_SHARED_OBJECT=./example-client-server.so $(GDB) $(TCLSH) __test__.tcl $(TCL_TEST_ARGS)
                        41: 	rm -f __test__.tcl
                        42: 
                        43: coverage:
                        44: 	$(MAKE) clean
                        45: 	$(MAKE) example.so XVFS_ADD_CFLAGS=-coverage XVFS_ADD_LDFLAGS=-coverage
                        46: 	$(MAKE) test XVFS_TEST_EXIT_ON_FAILURE=0
                        47: 	rm -f xvfs-test-coverage.info
                        48: 	lcov --capture --directory . --output-file xvfs-test-coverage.info
                        49: 	rm -rf xvfs-test-coverage
                        50: 	mkdir xvfs-test-coverage
                        51: 	genhtml xvfs-test-coverage.info --output-directory xvfs-test-coverage
                        52: 	rm -f xvfs-test-coverage.info
                        53: 
                        54: clean:
                        55: 	rm -f xvfs-create-standalone.new xvfs-create-standalone
                        56: 	rm -f example.c example.c.new
                        57: 	rm -f example.so example.o
                        58: 	rm -f example-client.o example-server.o example-client-server.so
                        59: 	rm -f example.gcda example.gcno
                        60: 	rm -f __test__.tcl
                        61: 	rm -f xvfs-test-coverage.info
                        62: 	rm -rf xvfs-test-coverage
                        63: 
                        64: distclean: clean
                        65: 
                        66: .PHONY: all clean distclean test coverage