-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
43 lines (38 loc) · 1.18 KB
/
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
37
38
39
40
41
42
43
#############################################################################
#
# Makefile for building: fastmorph & fastngrams
#
#############################################################################
CC = gcc
DEFINES = -DJSMN_PARENT_LINKS=1
#-DJSMN_PARENT_LINKS=1 Activating fastest mode in JSMN JSON library
CFLAGS = -g \
-Wall \
-Wextra \
-std=c99 \
-pthread \
-Ofast \
-fstack-protector \
-D_FORTIFY_SOURCE=2 \
-mcmodel=large
#-march=bdver1 # For AMD FX-4100 processor
INCPATH = -I mysql-connector-c/include
LIBS = -L/usr/lib64/mysql -l mysqlclient
SOURCES = jsmn-master/jsmn.c \
b64/decode.c
FASTMORPH = fastmorph
FASTNGRAMS = fastngrams
CLEAR = clear
RM = rm -f
all: $(FASTMORPH) $(FASTNGRAMS)
$(FASTMORPH): $(FASTMORPH).c clean
$(CLEAR)
$(CC) $(CFLAGS) $(INCPATH) $(LIBS) -o $(FASTMORPH) $(FASTMORPH).c $(SOURCES)
./$(FASTMORPH)
$(FASTNGRAMS): $(FASTNGRAMS).c clean
$(CLEAR)
$(CC) $(CFLAGS) $(INCPATH) $(LIBS) -o $(FASTNGRAMS) $(FASTNGRAMS).c $(SOURCES)
./$(FASTNGRAMS)
clean:
$(RM) $(FASTMORPH) *~ .*~ /tmp/fastmorph.socket
$(RM) $(FASTNGRAMS) *~ .*~ /tmp/fastngrams.socket