Makefile 425 Bytes
Newer Older
jkvis's avatar
jkvis committed
1
CC       = gcc
jkvis's avatar
jkvis committed
2
CFLAGS   = -O3 -fomit-frame-pointer -funroll-loops -march=native -I.
jkvis's avatar
jkvis committed
3 4 5 6
CPPFLAGS = -DNDEBUG -Wall -Wextra
TARGETS  = sais-lite-lcp
SOURCES  = sais-lite-lcp/sais.c
OBJECTS  = $(SOURCES:.c=.o)
jkvis's avatar
jkvis committed
7
DEPS     = $(OBJECTS:.o=.d)
jkvis's avatar
jkvis committed
8 9 10

.PHONY: clean

jkvis's avatar
jkvis committed
11 12
-include $(DEPS)

jkvis's avatar
jkvis committed
13 14 15 16
lib$(TARGETS:./%=%).a: $(OBJECTS)
	ar rcs $@ $<

clean:
jkvis's avatar
jkvis committed
17
	rm -f $(OBJECTS) $(DEPS) lib$(TARGETS:./%=%).a
jkvis's avatar
jkvis committed
18 19

%.o: %.c
jkvis's avatar
jkvis committed
20
	$(CC) $(CFLAGS) $(CPPFLAGS) -MMD -o $@ -c $<