-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (33 loc) · 1016 Bytes
/
Makefile
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
CC= gcc
CFLAGS= -g -gdwarf-2 -std=gnu99 -Wall
LDFLAGS=
LIBRARIES= lib/libmalloc-ff.so \
lib/libmalloc-nf.so \
lib/libmalloc-bf.so \
lib/libmalloc-wf.so
TESTS= tests/test1 \
tests/test2 \
tests/test3 \
tests/test4 \
tests/stressMallocTest \
tests/test6 \
tests/test7 \
tests/test8 \
tests/bfwf \
tests/ffnf \
tests/realloc \
tests/calloc
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: $(LIBRARIES) $(TESTS)
lib/libmalloc-ff.so: src/malloc.c
$(CC) -shared -fPIC $(CFLAGS) -DFIT=0 -o $@ $< $(LDFLAGS)
lib/libmalloc-nf.so: src/malloc.c
$(CC) -shared -fPIC $(CFLAGS) -DNEXT=0 -o $@ $< $(LDFLAGS)
lib/libmalloc-bf.so: src/malloc.c
$(CC) -shared -fPIC $(CFLAGS) -DBEST=0 -o $@ $< $(LDFLAGS)
lib/libmalloc-wf.so: src/malloc.c
$(CC) -shared -fPIC $(CFLAGS) -DWORST=0 -o $@ $< $(LDFLAGS)
clean:
rm -f $(LIBRARIES) $(TESTS)
.PHONY: all clean