From ac5f4ce817d1421798aa4b94daee8deb84e40f76 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 12 May 2021 16:11:40 +0100 Subject: Example: Fix problem on case-insensitive filesystem. Adds example commands to build the example. --- examples/example.mk | 24 ++++++++++++++++++++++++ examples/makefile | 18 ------------------ 2 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 examples/example.mk delete mode 100644 examples/makefile diff --git a/examples/example.mk b/examples/example.mk new file mode 100644 index 0000000..8e1da17 --- /dev/null +++ b/examples/example.mk @@ -0,0 +1,24 @@ +# From the top level: +# +# make -C examples -f example.mk clean +# make -C examples -f example.mk +# ./examples/dom-structure-dump examples/files/test.html + +CC := gcc +LD := gcc + +CFLAGS := `pkg-config --cflags libdom` `pkg-config --cflags libwapcaplet` -Wall -O0 -g +LDFLAGS := `pkg-config --libs libdom` `pkg-config --libs libwapcaplet` + +SRC := dom-structure-dump.c + +dom-structure-dump: $(SRC:.c=.o) + @$(LD) -o $@ $^ $(LDFLAGS) + +.PHONY: clean +clean: + $(RM) dom-structure-dump $(SRC:.c=.o) + +%.o: %.c + @$(CC) -c $(CFLAGS) -o $@ $< + diff --git a/examples/makefile b/examples/makefile deleted file mode 100644 index 47cc7ae..0000000 --- a/examples/makefile +++ /dev/null @@ -1,18 +0,0 @@ -CC := gcc -LD := gcc - -CFLAGS := `pkg-config --cflags libdom` `pkg-config --cflags libwapcaplet` -Wall -O0 -g -LDFLAGS := `pkg-config --libs libdom` `pkg-config --libs libwapcaplet` - -SRC := dom-structure-dump.c - -dom-structure-dump: $(SRC:.c=.o) - @$(LD) -o $@ $^ $(LDFLAGS) - -.PHONY: clean -clean: - $(RM) dom-structure-dump $(SRC:.c=.o) - -%.o: %.c - @$(CC) -c $(CFLAGS) -o $@ $< - -- cgit v1.2.3