Add missing Makefile to directory and .gitignore
[lttng-tools.git] / memleak / Makefile
1 # Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2 #
3 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
4 # OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
5 #
6 # Permission is hereby granted to use or copy this program for any
7 # purpose, provided the above notices are retained on all copies.
8 # Permission to modify the code and to distribute modified code is
9 # granted, provided the above notices are retained, and a notice that
10 # the code was modified is included with the above copyright notice.
11
12 # This Makefile is not using automake so that users may see how to build
13 # a program with tracepoint provider probes as stand-alone shared objects.
14
15 CC = gcc
16 LDFLAGS=-ldl
17 CFLAGS=-g -Wall
18
19 all: lttng-memleak-finder.so lttng-malloc-stats.so
20
21 lttng-memleak-finder.o: lttng-memleak-finder.c jhash.h
22 $(CC) $(CPPFLAGS) $(CFLAGS) -fpic -c -o $@ $<
23
24 lttng-memleak-finder.so: lttng-memleak-finder.o
25 $(CC) -shared -o $@ $(LDFLAGS) $^
26
27 lttng-malloc-stats.o: lttng-malloc-stats.c
28 $(CC) $(CPPFLAGS) $(CFLAGS) -fpic -c -o $@ $<
29
30 lttng-malloc-stats.so: lttng-malloc-stats.o
31 $(CC) -shared -o $@ $(LDFLAGS) $^
32
33 .PHONY: clean
34 clean:
35 rm -f *.o *.so
This page took 0.03078 seconds and 4 git commands to generate.