Push Swap

This commit is contained in:
Angel Ortigosa Perez
2025-09-08 14:02:27 +02:00
commit 31f2054f1c
16 changed files with 1036 additions and 0 deletions

30
Makefile Normal file
View File

@@ -0,0 +1,30 @@
NAME = push_swap
SRCS = cost.c main.c init.c moves.c position.c push.c rotate.c rrotate.c sort.c stack.c string.c swap.c three_sort.c utils.c
HEADER = ./push_swap.h
CC = cc
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
%o: %.c
${CC} ${CFLAGS} -c $< -o $@
OBJS = ${SRCS:.c=.o}
all: ${NAME}
${NAME}: ${OBJS} $(HEADER)
${CC} ${SRCS} -o ${NAME}
clean:
${RM} ${OBJS}
fclean:
${RM} ${OBJS}
${RM} ${NAME}
re: fclean all
.PHONY: all clean fclean re