-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (39 loc) · 876 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
##
## Makefile for asm_minilibc in /home/auzou_t/rendu/asm_minilibc
##
## Made by Thibaud Auzou
## Login <[email protected]>
##
## Started on Tue Mar 10 13:45:04 2015 Thibaud Auzou
## Last update Wed Mar 11 13:36:11 2015 Thibaud Auzou
##
ASM = nasm
CC = gcc
RM = rm -f
ASMFLAGS += -f elf64
NAME = libasm.so
SRCS = strlen/strlen.S \
memset/memset.S \
memcpy/memcpy.S \
memmove/memmove.S \
strcmp/strcmp.S \
strncmp/strncmp.S \
strcasecmp/strcasecmp.S \
strncasecmp/strncasecmp.S \
strcspn/strcspn.S \
strpbrk/strpbrk.S \
strstr/strstr.S \
rindex/rindex.S \
strchr/strchr.S \
OBJS = $(SRCS:.S=.o)
all: $(NAME)
$(NAME): $(OBJS)
$(CC) -fPIC -shared -o $(NAME) $(OBJS)
%.o: %.S
$(ASM) $(ASMFLAGS) $< -o $@
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: all clean fclean re