aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 12 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 21ebf11..9eee32f 100644
--- a/Makefile
+++ b/Makefile
@@ -6,21 +6,23 @@
# By: cacharle <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/11/22 02:56:22 by cacharle #+# #+# #
-# Updated: 2019/11/22 03:58:18 by cacharle ### ########.fr #
+# Updated: 2019/11/23 00:27:22 by cacharle ### ########.fr #
# #
# **************************************************************************** #
-NAME = libasm.a
+RM = rm -f
+LIB = ar rcs
CC = gcc
-CCFLAGS = -masm=intel -m64
+CCFLAGS = -Wall -Wextra
-ASMSRC = ft_strlen.s ft_strcpy.s ft_strcmp.s ft_write.s ft_read.s ft_strdup.s \
- ft_atoi_base.s
-ASMOBJ = $(ASMSRC:.s=.o)
+NASM = nasm
+NASMFLAGS = -f macho64
-RM = rm -f
-LIB = ar rcs
+NAME = libasm.a
+ASMSRC = ft_strlen.s ft_strcpy.s ft_strcmp.s ft_write.s ft_read.s \
+ ft_strdup.s ft_atoi_base.s
+ASMOBJ = $(ASMSRC:.s=.o)
all: $(NAME)
@@ -28,11 +30,10 @@ $(NAME): $(ASMOBJ)
$(LIB) $(NAME) $(ASMOBJ)
test: all
- $(CC) main.c -L. -lasm
+ $(CC) main.c $(NAME)
%.o: %.s
- $(CC) $(CCFLAGS) -c -o $@ $<
- @#nasm -f macho64 -o $@ $<
+ $(NASM) $(NASMFLAGS) -o $@ $<
clean:
$(RM) $(ASMOBJ)