From: David Goulet Date: Fri, 14 Jun 2013 20:19:09 +0000 (-0400) Subject: Add missing Makefile to directory and .gitignore X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=74310e7e6570f1ddd25828e519ef820ab2f9ee6e;p=lttng-tools.git Add missing Makefile to directory and .gitignore Signed-off-by: David Goulet --- diff --git a/.gitignore b/.gitignore index 120d93658..96a1ab140 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,8 @@ extras/bindings/swig/python/lttng_wrap.c .checkpatch.conf +!memleak/Makefile + # Tests tests/unit/test_kernel_data tests/unit/test_session diff --git a/memleak/Makefile b/memleak/Makefile new file mode 100644 index 000000000..5212216b9 --- /dev/null +++ b/memleak/Makefile @@ -0,0 +1,35 @@ +# Copyright (C) 2013 Mathieu Desnoyers +# +# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED +# OR IMPLIED. ANY USE IS AT YOUR OWN RISK. +# +# Permission is hereby granted to use or copy this program for any +# purpose, provided the above notices are retained on all copies. +# Permission to modify the code and to distribute modified code is +# granted, provided the above notices are retained, and a notice that +# the code was modified is included with the above copyright notice. + +# This Makefile is not using automake so that users may see how to build +# a program with tracepoint provider probes as stand-alone shared objects. + +CC = gcc +LDFLAGS=-ldl +CFLAGS=-g -Wall + +all: lttng-memleak-finder.so lttng-malloc-stats.so + +lttng-memleak-finder.o: lttng-memleak-finder.c jhash.h + $(CC) $(CPPFLAGS) $(CFLAGS) -fpic -c -o $@ $< + +lttng-memleak-finder.so: lttng-memleak-finder.o + $(CC) -shared -o $@ $(LDFLAGS) $^ + +lttng-malloc-stats.o: lttng-malloc-stats.c + $(CC) $(CPPFLAGS) $(CFLAGS) -fpic -c -o $@ $< + +lttng-malloc-stats.so: lttng-malloc-stats.o + $(CC) -shared -o $@ $(LDFLAGS) $^ + +.PHONY: clean +clean: + rm -f *.o *.so