summaryrefslogtreecommitdiff
path: root/Makefile
blob: f1301bf4558419b213912ab612414f4b76329143 (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
SRCS = \
	rgo/src/fastimpl.c \
	rgo/src/fndbyte.c \
	rgo/src/fndchr.c \
	rgo/src/memcpy.c \
	rgo/src/memdup.c \
	rgo/src/memeq.c \
	rgo/src/memfill.c \
	rgo/src/strdup.c \
	rgo/src/streq.c \
	rgo/src/strfill.c \
	rgo/src/strcpy.c \
	rgo/src/strlen.c

OBJS := $(SRCS:.c=.o)
LIB  := librgo.a

CFLAGS = \
	-Irgo/include \
	-Irgo/include-priv \
	-O3 \
	-g \
	-march=native

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

.PHONY: clean install purge

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

install: $(LIB)
	install -Dm644 rgo/include/rgo.h $(HDRDIR)/rgo.h
	install -Dm755 $(LIB) $(LIBDIR)/$(LIB)

clean:
	rm -fr $(OBJS)

purge:
	rm -fr $(LIB) $(OBJS)