-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (25 loc) · 746 Bytes
/
Makefile
File metadata and controls
32 lines (25 loc) · 746 Bytes
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
NAME = alloctracker
VERSION = 0.5.3
CC = gcc
CSTD = -std=gnu99
ARCH = 64
WARN = -Wall -Werror -Wextra -Wstrict-prototypes -Wunused \
-pedantic -pedantic-errors
CFLAGS = -c -ggdb -m$(ARCH) $(CSTD) $(WARN) \
-DALLOC_TRACKER_VERSION='"$(VERSION)"' -DAT_TRUNCATE_BACK=0
.PHONY: all test clean pack
all: obj/$(NAME).o
test: obj/$(NAME).o obj/at_test.o
mkdir -p bin
$(CC) -o bin/$(NAME)_test $^
obj/$(NAME).o: src/$(NAME).c \
src/$(NAME)_intern.h
mkdir -p obj
$(CC) $(CFLAGS) -o $@ $<
obj/at_test.o: src/at_test.c src/$(NAME).h
$(CC) $(CFLAGS) -DAT_ALLOC_TRACK -o $@ $<
clean:
rm -f obj/$(NAME).o obj/at_test.o bin/$(NAME)_test
rm -f src/*~ core.* *~
pack:
tar cJf $(NAME)_$(VERSION).txz src/ rsc/ Makefile LICENSE README* .gitignore