File: Makefile

package info (click to toggle)
leaktracer 2.4-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 100 kB
  • ctags: 74
  • sloc: cpp: 354; makefile: 86; perl: 67; sh: 17
file content (52 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
CC = g++

# Source files
SRC := LeakTracer.cc

# Comment out to disable thread safetly
THREAD=-DTHREAD_SAVE -D_REENTRANT -D_THREAD_SAFE -pthread 

# Common flags
CFLAGS = -g -Wall -W
C_FLAGS = $(CFLAGS) -pipe $(THREAD)
O_FLAGS = $(C_FLAGS)

# Object files
OBJ_DIR = .
OBJ   := $(patsubst %.cc,$(OBJ_DIR)/%.o,$(SRC))
SHOBJ := $(patsubst %.o,$(OBJ_DIR)/%.so,$(OBJ))

.PHONY: all clean tidy distrib test

all: $(OBJ) $(SHOBJ)

clean:	tidy 
	rm -f $(OBJ) leak.out

realclean: clean
	rm -f test *.so

tidy:
	rm -f *~ *orig *bak *rej

tags:	$(SRC) $(INCL)
	ctags $(SRC) $(INCL)

distrib: clean all README.html
	(cd .. && tar cvfz  /u/erwin/drylock/LeakTracer/LeakTracer.tar.gz -X LeakTracer/.tarexcl  LeakTracer/)

$(OBJ_DIR)/%.o: %.cc
	$(CC) -fPIC -c $(C_FLAGS) $< -o $@

$(OBJ_DIR)/%.so : $(OBJ_DIR)/%.o
	$(CC) $(O_FLAGS) -shared -o $@ $<

README.html: README
	/u/erwin/ed/mcl/util/htmlize.pl README

test:
	$(CC) $(C_FLAGS) test.cc -o test
	./test
	./LeakCheck ./test
	./leak-analyze ./test
#	./compare-test test.template test.result