summaryrefslogtreecommitdiff
path: root/zap/Makefile
blob: b7db3dc12799fff5f2cba6395020cf62d5c6025c (plain) (blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
# TOOLS

#CC = clang
#CC = gcc

# TOOL FLAGS

CFLAGS = \
	-Iinclude \
	-Iinclude-priv \
	-O3 \
	-fPIC \
	-g \
	-march=native \
	-std=c99 \
	-Wall \
	-Wextra \
	-Wpedantic

# ARTIFACTS

OBJS = \
	src/abs.o \
	src/fastimpl.o \
	src/fma.o \
	src/fndbyte.o \
	src/fndchr.o \
	src/foreach.o \
	src/memcmp.o \
	src/memcpy.o \
	src/memdup.o \
	src/memeq.o \
	src/memfill.o \
	src/strcmp.o \
	src/strdup.o \
	src/streq.o \
	src/strfill.o \
	src/strcpy.o \
	src/strlen.o

LIB = libzap.a

# OPTIONS

# Uncomment to disable assembly algorithms:
#CFLAGS += -Dzap_priv_noasm

# Uncomment to enable freestanding mode (requries no runtime):
#CFLAGS += \
	-Dzap_priv_nostdlib \
	-ffreestanding

# TARGETS

.PHONY: clean purge

$(LIB): $(OBJS)
	ar r $@ $(OBJS)

clean:
	rm -fr $(OBJS)

purge: clean
	rm -fr $(LIB)