Lines of
Makefile
from check-in 5583d77f1c
that are changed by the sequence of edits moving toward
check-in d80c88cee0:
5583d77f1c 2019-09-14 1: CPPFLAGS := -I. -DUSE_TCL_STUBS=1 -DXVFS_MODE_FLEXIBLE
2: CFLAGS := -fPIC -g3 -ggdb3 -Wall
3: LDFLAGS :=
4: LIBS := -ltclstub8.6
5: TCLSH := tclsh
6:
7: all: example.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) $(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: test: example.so
20: rm -f __test__.tcl
21: echo 'if {[catch { load ./example.so Xvfs_example; source //xvfs:/example/main.tcl }]} { puts stderr $$::errorInfo; exit 1 }; exit 0' > __test__.tcl
5583d77f1c 2019-09-14 22: $(GDB) $(TCLSH) __test__.tcl
23: rm -f __test__.tcl
24:
25: clean:
26: rm -f example.c example.c.new
27: rm -f example.so example.o
28: rm -f __test__.tcl
29:
30: distclean: clean
31:
32: .PHONY: all clean distclean test