forked from mit-nlp/MITIE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
54 lines (40 loc) · 1.05 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
44
45
46
47
48
49
50
51
52
53
SRC = src/main.cpp
TARGET = ner_stream
MITIEDIR = ../../mitielib
CFLAGS = -fPIC -Wall -W -O3 -I$(MITIEDIR)/include -I../../dlib
LDFLAGS = $(MITIEDIR)/libmitie.a
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
#LDFLAGS += -static
endif
#ifeq ($(UNAME_S),Darwin)
# LDFLAGS +=
#endif
CC = g++
####################################################
TMP = $(SRC:.cpp=.o)
OBJ = $(TMP:.c=.o)
$(TARGET): $(OBJ) $(MITIEDIR)
@echo Linking $@ with flags: $(LDFLAGS)
@$(CC) $(OBJ) -o $@ $(LDFLAGS)
@echo Build Complete
.PHONY: $(MITIEDIR)
$(MITIEDIR):
@$(MAKE) -C $(MITIEDIR)
.cpp.o: $<
@echo Compiling $<
@$(CC) -c $(CFLAGS) $< -o $@
.c.o: $<
@echo Compiling $<
@gcc -c $(CFLAGS) $< -o $@
clean:
@rm -f $(OBJ) $(TARGET)
@$(MAKE) -C $(MITIEDIR) clean
@echo All object files and binaries removed
dep:
@echo Running makedepend
@makedepend -- $(CFLAGS) -- $(SRC) 2> /dev/null
@echo Completed makedepend
################################################
########## Stuff from makedepend #############
################################################