summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2018-02-27 22:32:49 +0000
committerFreeArtMan <dos21h@gmail.com>2018-02-27 22:32:49 +0000
commit03bfeedc5f4c04c20764c8a9a58bd02604f27b2c (patch)
tree7ab09ac16649d80ca9e6397fc1b19aa8e184e2db /Makefile
parenta8b9b15b4f02ce3c6c7eac0d9393c44cb3fc668d (diff)
downloadlibbuf-03bfeedc5f4c04c20764c8a9a58bd02604f27b2c.tar.gz
libbuf-03bfeedc5f4c04c20764c8a9a58bd02604f27b2c.zip
Created circular buffer
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index ff53f43..31ada08 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,17 @@
CC=gcc
-CFLAGS=-g3
+CFLAGS=-fPIC -g3
make:
- $(CC) -c buf.c
- $(CC) $(CFLAGS) -fPIC -lc -ldl buf.c -shared -o libbuf.so
+ $(CC) $(CFLAGS) -c buf.c
+ $(CC) $(CFLAGS) -c buf_misc.c
+ $(CC) $(CFLAGS) -fPIC -lc -ldl buf_misc.o buf.o -shared -o libbuf.so
-test: buf.c
- $(CC) $(CFLAGS) buf.o test.c -o test
+t: buf.c buf_misc.c
+ $(CC) $(CFLAGS) buf.o buf_misc.o test.c -o test
+ $(CC) $(CFLAGS) buf.o buf_misc.o test_circ.c -o test_circ
leak:
- valgrind --leak-check=full --track-origins=yes --log-file=log.txt ./test
+ valgrind --leak-check=full --track-origins=yes --log-file=log.txt ./test_circ
clean:
rm -rf *.so *.o