Diff

Differences From Artifact [6ff0798462]:

To Artifact [ca54464a99]:


     1      1   CC = gcc
     2      2   PKG_CONFIG = pkg-config
     3         -CFLAGS = $(shell $(PKG_CONFIG) --cflags fuse)
     4         -LIBS = $(shell $(PKG_CONFIG) --libs fuse)
            3  +TCL_CFLAGS =
            4  +TCL_LDFLAGS =
            5  +TCL_LIBS = -ltcl
            6  +CFLAGS = -Wall -g3 $(shell $(PKG_CONFIG) --cflags fuse) $(TCL_CFLAGS)
            7  +LDFLAGS = $(TCL_LDFLAGS)
            8  +LIBS = $(shell $(PKG_CONFIG) --libs fuse) $(TCL_LIBS)
     5      9   PREFIX = /usr/local
     6     10   prefix = $(PREFIX)
     7     11   bindir = $(prefix)/bin
     8     12   
     9     13   all: appfs
    10     14   
    11     15   appfs: appfs.o
    12     16   	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfs appfs.o $(LIBS)
    13     17   
    14         -appfs.o: appfs.c
           18  +appfs-test: appfs-test.o
           19  +	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfs-test appfs-test.o $(LIBS)
           20  +
           21  +appfs.o: appfs.c appfs.tcl.h
           22  +	$(CC) $(CPPFLAGS) $(CFLAGS) -o appfs.o -c appfs.c
           23  +
           24  +appfs-test.o: appfs.c appfs.tcl.h
           25  +	$(CC) $(CPPFLAGS) $(CFLAGS) -DAPPFS_TEST_DRIVER=1 -o appfs-test.o -c appfs.c
           26  +
           27  +appfs.tcl.h: appfs.tcl stringify.tcl
           28  +	./stringify.tcl appfs.tcl > appfs.tcl.h.new
           29  +	mv appfs.tcl.h.new appfs.tcl.h
    15     30   
    16     31   install: appfs
    17     32   	cp appfs $(bindir)
    18     33   
           34  +test: appfs-test
           35  +	./appfs-test
           36  +
    19     37   clean:
    20     38   	rm -f appfs appfs.o
           39  +	rm -f appfs-test appfs-test.o
           40  +	rm -f appfs.tcl.h
    21     41   
    22     42   distclean: clean
    23     43   
    24         -.PHONY: all clean distclean install
           44  +.PHONY: all test clean distclean install