Lines of
Makefile
from check-in d80c88cee0
that are changed by the sequence of edits moving toward
check-in 77d5262842:
d80c88cee0 2019-09-16 1: CPPFLAGS := -I. -DUSE_TCL_STUBS=1 -DXVFS_MODE_FLEXIBLE -DXVFS_DEBUG
d80c88cee0 2019-09-16 2: CFLAGS := -fPIC -g3 -ggdb3 -Wall
d80c88cee0 2019-09-16 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: # xvfs-create-standalone is a standalone (i.e., no external dependencies
20: # like lib/minirivet, xvfs-core.c, etc) version of "xvfs-create"
21: xvfs-create-standalone: $(shell find lib -type f) xvfs-create xvfs-core.c xvfs-core.h xvfs.c.rvt
22: rm -f xvfs-create-standalone.new xvfs-create-standalone
23: ./xvfs-create --dump-tcl --remove-debug > xvfs-create-standalone.new
24: chmod +x xvfs-create-standalone.new
25: mv xvfs-create-standalone.new xvfs-create-standalone
26:
27: test: example.so
28: rm -f __test__.tcl
29: echo 'if {[catch { load ./example.so Xvfs_example; source //xvfs:/example/main.tcl }]} { puts stderr $$::errorInfo; exit 1 }; exit 0' > __test__.tcl
30: $(GDB) $(TCLSH) __test__.tcl $(TCL_TEST_ARGS)
31: rm -f __test__.tcl
32:
33: clean:
34: rm -f xvfs-create-standalone.new xvfs-create-standalone
35: rm -f example.c example.c.new
36: rm -f example.so example.o
37: rm -f __test__.tcl
38:
39: distclean: clean
40:
d80c88cee0 2019-09-16 41: .PHONY: all clean distclean test