-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (31 loc) · 1.1 KB
/
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
#
#
#
#
COMPILER = gcc
DEBUG = -O0 -g
FAST = -O3
FLAGS = -ansi -std=c99 -Wall $(DEBUG)
CC = $(COMPILER) $(FLAGS)
CO = $(CC) -c
all: test_memtools_disabled test_memtools_enabled
test_memtools_disabled: test_memtools_disabled.o libmemtools.a
$(CC) test_memtools_disabled.o libmemtools.a -o test_memtools_disabled
test_memtools_enabled: test_memtools_enabled.o libmemtools.a
$(CC) test_memtools_enabled.o libmemtools.a -o test_memtools_enabled
test_memtools_enabled.o: memtools_test.c
$(CO) -DMEMTOOLS memtools_test.c -o test_memtools_enabled.o
test_memtools_disabled.o: memtools_test.c
$(CO) memtools_test.c -o test_memtools_disabled.o
libmemtools.a: memtools.o memtools_memory_interface.o
ar rc libmemtools.a memtools.o memtools_memory_interface.o
memtools.o: memtools.c memtools.h memtools_internal.h
$(CO) memtools.c -o memtools.o
memtools_memory_interface.o: memtools_memory_interface.h memtools_memory_interface.c
$(CO) memtools_memory_interface.c -o memtools_memory_interface.o
clean:
rm -f *.a
rm -f *.o
rm -f test_memtools_enabled
rm -f test_memtools_disabled
rm -rf *.dSYM