-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
36 lines (27 loc) · 785 Bytes
/
Makefile
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
CC=clang
AR=ar
CFLAGS=-O3 -g -fomit-frame-pointer -Isrc/libdivsufsort/include -Isrc
OBJDIR=obj
LDFLAGS=-L. -lapultra
$(OBJDIR)/%.o: src/../%.c
@mkdir -p '$(@D)'
$(CC) $(CFLAGS) -c $< -o $@
APP := apultra
LIB := libapultra.a
LIBOBJS += $(OBJDIR)/src/expand.o
LIBOBJS += $(OBJDIR)/src/matchfinder.o
LIBOBJS += $(OBJDIR)/src/shrink.o
LIBOBJS += $(OBJDIR)/src/libdivsufsort/lib/divsufsort.o
LIBOBJS += $(OBJDIR)/src/libdivsufsort/lib/divsufsort_utils.o
LIBOBJS += $(OBJDIR)/src/libdivsufsort/lib/sssort.o
LIBOBJS += $(OBJDIR)/src/libdivsufsort/lib/trsort.o
APPOBJS := $(OBJDIR)/src/apultra.o
all: $(APP) $(LIB)
$(APP): $(LIB) $(APPOBJS)
$(CC) $^ $(LDFLAGS) -o $(APP)
$(LIB): $(LIBOBJS)
$(AR) rcs $(LIB) $(LIBOBJS)
libs: $(LIB)
clean:
@rm -rf $(APP) $(OBJDIR)
@rm -rf $(LIB)