-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (42 loc) · 795 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
##
## Makefile for in /home/le-rou_c/docs/asm_minilibc
##
## Made by Lucien Le Roux
## Login <[email protected]>
##
## Started on Tue Feb 28 09:39:50 2017 Lucien Le Roux
## Last update Thu Mar 2 16:21:24 2017 Lucien Le Roux
##
# Automatic variables:
# https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
NAME = libasm.so
SRC = strlen.s \
strchr.s \
strcmp.s \
strncmp.s \
strcasecmp.s \
rindex.s \
strstr.s \
strpbrk.s \
strspn.s \
strcspn.s \
memset.s \
memcpy.s \
memmove.s \
tolower.s \
toupper.s
OBJ = $(SRC:.s=.o)
AS = nasm -f elf64 -g
LD = ld -shared
RM = rm -f
all: $(NAME)
$(NAME): $(OBJ)
$(LD) $^ -o $(NAME)
# Object files
%.o: %.s
$(AS) $< -o $@
clean:
$(RM) $(OBJ)
fclean: clean
$(RM) $(NAME)
re: fclean all