-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
43 lines (35 loc) · 812 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
37
38
39
40
41
42
43
# all configuration file
# compailer
CC = g++
# flags
CFLAGS = -c -std=c++11
# special flags
SFLAGS = -lpthread -o
# install dir
MKDIR = mkdir -p
# install file
INSTALL_FILE = install -m 644 -p
# install binary
INSTALL_PROGRAM = install -m 755 -p
# bin directory
BIN = /usr/local/bin
# destination folder
DEST_DIR = /usr/local/share/AndKamus
compile: app.o andkamus.o
$(MKDIR) build
$(CC) *.o $(SFLAGS) build/AndKamus
app.o: src/app.cpp
$(CC) $(CFLAGS) src/app.cpp
andkamus.o: src/AndKamus.cpp
$(CC) $(CFLAGS) src/AndKamus.cpp
install:
$(INSTALL_PROGRAM) build/AndKamus $(BIN)
$(MKDIR) $(DEST_DIR)
$(MKDIR) $(DEST_DIR)/data
$(INSTALL_FILE) assets/andkamus.csv $(DEST_DIR)/data/andkamus.csv
uninstall:
rm $(BIN)/AndKamus
rm -r $(DEST_DIR)
clean:
rm -f *.o build/AndKamus
all: compile install