-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
49 lines (39 loc) · 803 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
44
45
46
47
48
49
##
## LUMZ APP, 2020
## Makefile
##
SRC = $(wildcard src/**.c)
OBJ = $(SRC:.c=.o)
PREFIX = /usr/local
NAME = ga
NAME_LIB = libga.a
CFLAGS = -Wall \
-W \
-I include
all: $(NAME)
$(NAME):$(OBJ)
# BIN
$(CC) -o $(NAME) $(OBJ) $(CFLAGS)
# LIB
$(AR) rcs $(NAME_LIB) $(OBJ)
install:
# BIN
mkdir -p $(PREFIX)/bin
cp $(NAME) $(PREFIX)/bin/$(NAME)
# LIB
mkdir -p $(PREFIX)/lib
mkdir -p $(PREFIX)/include
cp $(NAME_LIB) $(PREFIX)/lib/$(NAME_LIB)
cp include/totp.h $(PREFIX)/include/ga.h
uninstall:
# BIN
rm -f $(PREFIX)/bin/$(NAME)
# LIB
rm -f $(PREFIX)/lib/$(NAME_LIB)
rm -f $(PREFIX)/include/ga.h
clean:
rm -f $(OBJ)
fclean: clean
rm -f $(NAME)
rm -rf $(NAME_LIB)
re: fclean all