Artifact
71d33fb8c0721eb75495f419d62fc7c3e9158b8b:
0000: 43 43 20 3d 20 67 63 63 0a 50 4b 47 5f 43 4f 4e CC = gcc.PKG_CON
0010: 46 49 47 20 3d 20 70 6b 67 2d 63 6f 6e 66 69 67 FIG = pkg-config
0020: 0a 43 46 4c 41 47 53 20 3d 20 2d 57 61 6c 6c 20 .CFLAGS = -Wall
0030: 2d 67 33 20 24 28 73 68 65 6c 6c 20 24 28 50 4b -g3 $(shell $(PK
0040: 47 5f 43 4f 4e 46 49 47 29 20 2d 2d 63 66 6c 61 G_CONFIG) --cfla
0050: 67 73 20 66 75 73 65 29 20 24 28 54 43 4c 5f 43 gs fuse) $(TCL_C
0060: 46 4c 41 47 53 29 0a 4c 44 46 4c 41 47 53 20 3d FLAGS).LDFLAGS =
0070: 20 24 28 54 43 4c 5f 4c 44 46 4c 41 47 53 29 0a $(TCL_LDFLAGS).
0080: 4c 49 42 53 20 3d 20 24 28 73 68 65 6c 6c 20 24 LIBS = $(shell $
0090: 28 50 4b 47 5f 43 4f 4e 46 49 47 29 20 2d 2d 6c (PKG_CONFIG) --l
00a0: 69 62 73 20 66 75 73 65 29 20 24 28 54 43 4c 5f ibs fuse) $(TCL_
00b0: 4c 49 42 53 29 0a 50 52 45 46 49 58 20 3d 20 2f LIBS).PREFIX = /
00c0: 75 73 72 2f 6c 6f 63 61 6c 0a 70 72 65 66 69 78 usr/local.prefix
00d0: 20 3d 20 24 28 50 52 45 46 49 58 29 0a 62 69 6e = $(PREFIX).bin
00e0: 64 69 72 20 3d 20 24 28 70 72 65 66 69 78 29 2f dir = $(prefix)/
00f0: 62 69 6e 0a 0a 69 66 6e 65 71 20 28 24 28 54 43 bin..ifneq ($(TC
0100: 4c 4b 49 54 5f 53 44 4b 5f 44 49 52 29 2c 29 0a LKIT_SDK_DIR),).
0110: 54 43 4c 43 4f 4e 46 49 47 5f 53 48 5f 50 41 54 TCLCONFIG_SH_PAT
0120: 48 20 3d 20 24 28 54 43 4c 4b 49 54 5f 53 44 4b H = $(TCLKIT_SDK
0130: 5f 44 49 52 29 2f 6c 69 62 2f 74 63 6c 43 6f 6e _DIR)/lib/tclCon
0140: 66 69 67 2e 73 68 0a 54 43 4c 5f 4c 44 46 4c 41 fig.sh.TCL_LDFLA
0150: 47 53 20 3d 20 2d 57 6c 2c 2d 52 2c 24 28 54 43 GS = -Wl,-R,$(TC
0160: 4c 4b 49 54 5f 53 44 4b 5f 44 49 52 29 2f 6c 69 LKIT_SDK_DIR)/li
0170: 62 0a 65 78 70 6f 72 74 20 54 43 4c 4b 49 54 5f b.export TCLKIT_
0180: 53 44 4b 5f 44 49 52 0a 65 6c 73 65 0a 54 43 4c SDK_DIR.else.TCL
0190: 43 4f 4e 46 49 47 5f 53 48 5f 50 41 54 48 20 3d CONFIG_SH_PATH =
01a0: 20 24 28 73 68 65 6c 6c 20 65 63 68 6f 20 27 70 $(shell echo 'p
01b0: 75 74 73 20 5b 3a 3a 74 63 6c 3a 3a 70 6b 67 63 uts [::tcl::pkgc
01c0: 6f 6e 66 69 67 20 67 65 74 20 6c 69 62 64 69 72 onfig get libdir
01d0: 2c 69 6e 73 74 61 6c 6c 5d 27 20 7c 20 74 63 6c ,install]' | tcl
01e0: 73 68 29 2f 74 63 6c 43 6f 6e 66 69 67 2e 73 68 sh)/tclConfig.sh
01f0: 0a 65 6e 64 69 66 0a 54 43 4c 5f 43 46 4c 41 47 .endif.TCL_CFLAG
0200: 53 20 3d 20 24 28 73 68 65 6c 6c 20 2e 20 24 28 S = $(shell . $(
0210: 54 43 4c 43 4f 4e 46 49 47 5f 53 48 5f 50 41 54 TCLCONFIG_SH_PAT
0220: 48 29 3b 20 65 63 68 6f 20 22 24 24 7b 54 43 4c H); echo "$${TCL
0230: 5f 49 4e 43 4c 55 44 45 5f 53 50 45 43 7d 22 29 _INCLUDE_SPEC}")
0240: 0a 54 43 4c 5f 4c 49 42 53 20 3d 20 24 28 73 68 .TCL_LIBS = $(sh
0250: 65 6c 6c 20 2e 20 24 28 54 43 4c 43 4f 4e 46 49 ell . $(TCLCONFI
0260: 47 5f 53 48 5f 50 41 54 48 29 3b 20 65 63 68 6f G_SH_PATH); echo
0270: 20 22 24 24 7b 54 43 4c 5f 4c 49 42 5f 53 50 45 "$${TCL_LIB_SPE
0280: 43 7d 22 29 0a 0a 61 6c 6c 3a 20 61 70 70 66 73 C}")..all: appfs
0290: 0a 0a 61 70 70 66 73 3a 20 61 70 70 66 73 2e 6f ..appfs: appfs.o
02a0: 0a 09 24 28 43 43 29 20 24 28 43 50 50 46 4c 41 ..$(CC) $(CPPFLA
02b0: 47 53 29 20 24 28 43 46 4c 41 47 53 29 20 24 28 GS) $(CFLAGS) $(
02c0: 4c 44 46 4c 41 47 53 29 20 2d 6f 20 61 70 70 66 LDFLAGS) -o appf
02d0: 73 20 61 70 70 66 73 2e 6f 20 24 28 4c 49 42 53 s appfs.o $(LIBS
02e0: 29 0a 0a 61 70 70 66 73 2d 74 65 73 74 3a 20 61 )..appfs-test: a
02f0: 70 70 66 73 2d 74 65 73 74 2e 6f 0a 09 24 28 43 ppfs-test.o..$(C
0300: 43 29 20 24 28 43 50 50 46 4c 41 47 53 29 20 24 C) $(CPPFLAGS) $
0310: 28 43 46 4c 41 47 53 29 20 24 28 4c 44 46 4c 41 (CFLAGS) $(LDFLA
0320: 47 53 29 20 2d 6f 20 61 70 70 66 73 2d 74 65 73 GS) -o appfs-tes
0330: 74 20 61 70 70 66 73 2d 74 65 73 74 2e 6f 20 24 t appfs-test.o $
0340: 28 4c 49 42 53 29 0a 0a 61 70 70 66 73 2e 6f 3a (LIBS)..appfs.o:
0350: 20 61 70 70 66 73 2e 63 20 61 70 70 66 73 2e 74 appfs.c appfs.t
0360: 63 6c 2e 68 0a 09 24 28 43 43 29 20 24 28 43 50 cl.h..$(CC) $(CP
0370: 50 46 4c 41 47 53 29 20 24 28 43 46 4c 41 47 53 PFLAGS) $(CFLAGS
0380: 29 20 2d 6f 20 61 70 70 66 73 2e 6f 20 2d 63 20 ) -o appfs.o -c
0390: 61 70 70 66 73 2e 63 0a 0a 61 70 70 66 73 2d 74 appfs.c..appfs-t
03a0: 65 73 74 2e 6f 3a 20 61 70 70 66 73 2e 63 20 61 est.o: appfs.c a
03b0: 70 70 66 73 2e 74 63 6c 2e 68 0a 09 24 28 43 43 ppfs.tcl.h..$(CC
03c0: 29 20 24 28 43 50 50 46 4c 41 47 53 29 20 24 28 ) $(CPPFLAGS) $(
03d0: 43 46 4c 41 47 53 29 20 2d 44 41 50 50 46 53 5f CFLAGS) -DAPPFS_
03e0: 54 45 53 54 5f 44 52 49 56 45 52 3d 31 20 2d 6f TEST_DRIVER=1 -o
03f0: 20 61 70 70 66 73 2d 74 65 73 74 2e 6f 20 2d 63 appfs-test.o -c
0400: 20 61 70 70 66 73 2e 63 0a 0a 61 70 70 66 73 2e appfs.c..appfs.
0410: 74 63 6c 2e 68 3a 20 61 70 70 66 73 2e 74 63 6c tcl.h: appfs.tcl
0420: 20 73 74 72 69 6e 67 69 66 79 2e 74 63 6c 0a 09 stringify.tcl..
0430: 2e 2f 73 74 72 69 6e 67 69 66 79 2e 74 63 6c 20 ./stringify.tcl
0440: 61 70 70 66 73 2e 74 63 6c 20 3e 20 61 70 70 66 appfs.tcl > appf
0450: 73 2e 74 63 6c 2e 68 2e 6e 65 77 0a 09 6d 76 20 s.tcl.h.new..mv
0460: 61 70 70 66 73 2e 74 63 6c 2e 68 2e 6e 65 77 20 appfs.tcl.h.new
0470: 61 70 70 66 73 2e 74 63 6c 2e 68 0a 0a 69 6e 73 appfs.tcl.h..ins
0480: 74 61 6c 6c 3a 20 61 70 70 66 73 0a 09 63 70 20 tall: appfs..cp
0490: 61 70 70 66 73 20 24 28 62 69 6e 64 69 72 29 0a appfs $(bindir).
04a0: 0a 74 65 73 74 3a 20 61 70 70 66 73 2d 74 65 73 .test: appfs-tes
04b0: 74 0a 09 2e 2f 61 70 70 66 73 2d 74 65 73 74 0a t.../appfs-test.
04c0: 0a 63 6c 65 61 6e 3a 0a 09 72 6d 20 2d 66 20 61 .clean:..rm -f a
04d0: 70 70 66 73 20 61 70 70 66 73 2e 6f 0a 09 72 6d ppfs appfs.o..rm
04e0: 20 2d 66 20 61 70 70 66 73 2d 74 65 73 74 20 61 -f appfs-test a
04f0: 70 70 66 73 2d 74 65 73 74 2e 6f 0a 09 72 6d 20 ppfs-test.o..rm
0500: 2d 66 20 61 70 70 66 73 2e 74 63 6c 2e 68 0a 0a -f appfs.tcl.h..
0510: 64 69 73 74 63 6c 65 61 6e 3a 20 63 6c 65 61 6e distclean: clean
0520: 0a 0a 2e 50 48 4f 4e 59 3a 20 61 6c 6c 20 74 65 ...PHONY: all te
0530: 73 74 20 63 6c 65 61 6e 20 64 69 73 74 63 6c 65 st clean distcle
0540: 61 6e 20 69 6e 73 74 61 6c 6c 0a an install.