aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-12-22 23:03:44 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2017-12-22 23:03:44 -0500
commit3e4c76bf41011d8f40136a4010e9ff331b00b4ea (patch)
tree82349a7c9f95b6c95c68daa8176cb42f75f182a9 /Makefile
parent5926e6122a8eaf70aac25fa7b2c3bf12c7025978 (diff)
downloadlibctemplates-3e4c76bf41011d8f40136a4010e9ff331b00b4ea.tar.gz
libctemplates-3e4c76bf41011d8f40136a4010e9ff331b00b4ea.tar.bz2
libctemplates-3e4c76bf41011d8f40136a4010e9ff331b00b4ea.zip
Renamed files
Renamed everything that needed to be rename from libctemplate to libctemplates
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8880d3e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+CFLAGS = -I. -L. -std=c99 -pedantic -Wall -Werror -O3
+CC = gcc
+LIBNAME = libctemplates.a
+
+$(LIBNAME): ctemplates.o fbuf.o kmp.o hashmap.o
+ ar rc $(LIBNAME) ctemplates.o fbuf.o kmp.o hashmap.o
+ ranlib $(LIBNAME)
+
+fbuf.o : fbuf.c fbuf.h
+ $(CC) $(CFLAGS) -c -o fbuf.o fbuf.c
+
+kmp.o : kmp.c kmp.h
+ $(CC) $(CFLAGS) -c -o kmp.o kmp.c
+
+ctemplates.o: ctemplates.c ctemplates.h
+ $(CC) $(CFLAGS) -c -o ctemplates.o ctemplates.c
+
+hashmap.o: hashmap.c hashmap.h
+ $(CC) $(CFLAGS) -c -o hashmap.o hashmap.c
+
+clean:
+ rm -f *.o *.a template
+
+test:
+ cd t; ./test.sh
+
+install: $(LIBNAME)
+ cp $(LIBNAME) /usr/local/lib
+ cp ctemplates.h /usr/local/include/