-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (44 loc) · 937 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
##
## Makefile for asm_minilibc in /home/work/work/projects/asm_minilibc_doc/asm_minilibc
##
## Made by Bastien DHIVER
## Login <[email protected]>
##
## Started on Thu Feb 25 14:48:56 2016 Bastien DHIVER
## Last update Fri Mar 25 08:55:27 2016 Bastien DHIVER
##
CC = gcc
ASM = nasm
RM = rm -f
ASFLAGS += -f elf64
NAME = libasm.so
NAME_B = libasmbonus.so
BONUS_F = bonus/
BONUS = $(BONUS_F)strdup.S
SRCS = strlen.S \
strchr.S \
memset.S \
memcpy.S \
strcmp.S \
memmove.S \
rindex.S \
strncmp.S \
strcasecmp.S \
strstr.S \
strpbrk.S \
strcspn.S
OBJS = $(SRCS:.S=.o)
OBJS_B = $(BONUS:.S=.o)
%.o: %.S
$(ASM) $(ASFLAGS) $< -o $@
$(NAME): $(OBJS)
$(CC) -fPIC -shared $(OBJS) -o $(NAME)
all: $(NAME)
bonus: $(OBJS_B)
$(CC) -fPIC -shared $(OBJS_B) -o $(NAME_B)
clean:
$(RM) $(OBJS) $(OBJS_B)
fclean: clean
$(RM) $(NAME) $(NAME_B)
re: fclean all
.PHONY: all clean fclean re bonus