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..8c5d828
--- /dev/null
+++ b/examples/makefile
@@ -0,0 +1,18 @@
+CC := gcc
+LD := gcc
+
+CFLAGS := `pkg-config --cflags libhubbub` `xml2-config --cflags`
+LDFLAGS := `pkg-config --libs libhubbub` `xml2-config --libs`
+
+SRC := libxml.c
+
+libxml: $(SRC:.c=.o)
+ @$(LD) -o $@ $^ $(LDFLAGS)
+
+.PHONY: clean
+clean:
+ $(RM) libxml $(SRC:.c=.o)
+
+%.o: %.c
+ @$(CC) -c $(CFLAGS) -o $@ $<
+