diff options
author | FreeArtMan <dos21h@gmail.com> | 2019-05-12 12:46:02 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2019-05-12 12:46:02 +0100 |
commit | 654bb8b09dd90c12c3a51ffdce800b2255b753b5 (patch) | |
tree | 67591880f34d6220b9026883b0ceb54f022aa385 /Makefile | |
parent | 03bfeedc5f4c04c20764c8a9a58bd02604f27b2c (diff) | |
download | libbuf-654bb8b09dd90c12c3a51ffdce800b2255b753b5.tar.gz libbuf-654bb8b09dd90c12c3a51ffdce800b2255b753b5.zip |
Moved everything to C+. First test works
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -1,19 +1,26 @@ +CPP=g++ CC=gcc -CFLAGS=-fPIC -g3 +CFLAGS=-fPIC -g3 -Wall -Wwrite-strings -fno-exceptions -fno-unwind-tables -fpermissive +CPPFLAGS=-fPIC -g3 -Wall -Wwrite-strings -fpermissive -fno-rtti -fno-exceptions -fno-unwind-tables make: - $(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 + $(CPP) $(CPPFLAGS) -c buf.c + $(CPP) $(CFLAGS) -c buf_misc.c + #$(CPP) $(CFLAGS) -c buf_sys.c + #$(CC) $(CFLAGS) -fPIC -lc -ldl buf_sys.o buf_misc.o buf.o -shared -o libbuf.so + $(CC) $(CFLAGS) -fPIC -lc -ldl buf.o -shared -o libbuf.so -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 +t: buf.c buf_misc.c buf_sys.c + $(CPP) $(CPPFLAGS) test.c -c + $(CC) $(CFLAGS) buf.o test.o -o test + #$(CC) $(CFLAGS) buf.o buf_misc.o buf_sys.o test_circ.c -o test_circ + #$(CC) $(CFLAGS) buf.o buf_misc.o buf_sys.o test_circ.c -o test_sys + #$(CC) $(CFLAGS) buf.o buf_misc.o test_line.c -o test_line leak: - valgrind --leak-check=full --track-origins=yes --log-file=log.txt ./test_circ + valgrind --leak-check=full --track-origins=yes --log-file=log.txt ./test clean: - rm -rf *.so *.o + rm -rf *.so *.o test test_circ test_sys |