File: Makefile

package info (click to toggle)
ccmalloc 0.2.3-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 480 kB
  • ctags: 485
  • sloc: ansic: 4,523; sh: 204; makefile: 116; cpp: 86
file content (43 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download | duplicates (2)
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
CC=gcc
CFLAGS=-g -Wall 
CXX=g++
CXXFLAGS=$(CFLAGS)

.SUFFIXES: .exe .c .cc

.cc.exe:
	$(CXX) $(CXXFLAGS) -o $@ $*.cc ../src/ccmalloc.o -ldl
.c.exe:
	$(CC) $(CFLAGS) -o $@ $*.c -L../src -lccmalloc -ldl
all:
	./testall
clean:
	rm -f *.exe *.log *.log.gz *.log.* .ccmalloc core a.out
	rm -f lib_test_C_11.a lib_test_C_19.so *.o
	rm -f test_C_02.c test_C_03.c test_C_13.c test_C_14.c

lib_test_C_11.a: lib_test_C_11.o
	ar cr $@ lib_test_C_11.o
	ranlib $@

test_C_11.exe: lib_test_C_11.a test_C_11.o
	$(CC) $(CFLAGS) -o $@ $*.o \
	  -L. -l_test_C_11 \
	  -L../src -lccmalloc -ldl

lib_test_C_19.so: lib_test_C_19.c
	$(CC) $(CFLAGS) -fPIC -c -o lib_test_C_19.o lib_test_C_19.c
	gcc -shared -WL,-soname,$@ -o $@ lib_test_C_19.o

test_C_19.exe: test_C_19.o lib_test_C_19.so
	$(CC) $(CLAGS) -o $@ test_C_19.o -L. -l_test_C_19 \
	  -L../src/ -lccmalloc -ldl

# no debugging info

test_C_13.exe: test_C_13.c
	$(CC) -o $@ -O2 $*.c -L../src -lccmalloc -ldl

test_C_14.exe: test_C_14.c
	gcc -o $@ -fomit-frame-pointer -O2 $*.c -L../src -lccmalloc -ldl