summaryrefslogtreecommitdiff
path: root/examples/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/makefile')
-rw-r--r--examples/makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/makefile b/examples/makefile
new file mode 100644
index 0000000..fc315cc
--- /dev/null
+++ b/examples/makefile
@@ -0,0 +1,18 @@
+CC := gcc
+LD := gcc
+
+CFLAGS := `pkg-config --cflags libdom` `pkg-config --cflags libwapcaplet`
+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 $@ $<
+