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

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

ASFLAGS = \
	-Irgo/include \
	-g \
	-march=native

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

.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)