aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2019-09-04 20:29:20 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2019-09-04 20:29:20 -0400
commitd1a1990c4177653fd2379c227142e6208ecfc20d (patch)
tree1ca9468b96a7bdfae79753913cf052d986f014c3 /Makefile
parent06087b10ec7a897ad48db83f7f33a8fc11fa9341 (diff)
downloadlibctemplates-d1a1990c4177653fd2379c227142e6208ecfc20d.tar.gz
libctemplates-d1a1990c4177653fd2379c227142e6208ecfc20d.tar.bz2
libctemplates-d1a1990c4177653fd2379c227142e6208ecfc20d.zip
Fix typos in headers
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 906d19d..f772350 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,10 @@ objfiles = $(objs:%=build/%.o)
TEST_1_NAME = t/test_1$(BIN_POSTFIX)
TEST_2_NAME = t/test_2$(BIN_POSTFIX)
+examples=hello variable
+example_bins=$(examples:%=examples/%$(BIN_POSTFIX))
+example_objs=$(examples:%=examples/%.o)
+
$(LIBNAME): $(objfiles)
ar rc $@ $^
ranlib $@
@@ -36,6 +40,14 @@ test: $(TEST_1_NAME) $(TEST_2_NAME)
#$(TEST_1_NAME)
$(TEST_2_NAME)
+examples: $(example_bins)
+ $(example_bins)
+$(example_bins): %$(BIN_POSTFIX) : %.o
+ $(CC) $(CFLAGS) -o $@ $< -lctemplates
+
+$(example_objs): %.o : %.c
+ $(CC) -I./include -L. -c -o $@ $< -lctemplates
+
install: $(LIBNAME)
cp $(LIBNAME) /usr/local/lib
mkdir -p /usr/local/include/ctemplates