Skip to content

Commit

Permalink
feat: add optimized fdf and makefiles simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
ygor-sena committed Sep 23, 2022
1 parent 1d48f65 commit 6d8453b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ OBJS_PATH = obj
SRCS = $(addprefix $(SRCS_PATH)/, $(SRC))
OBJS = $(addprefix $(OBJS_PATH)/, $(SRC:.c=.o))

CC = cc -Wall -Wextra -Werror -g
CC = cc -Wall -Wextra -Werror -O3
MLX = -lmlx -lXext -lX11 -lm
RM = rm -rf

Expand Down
2 changes: 1 addition & 1 deletion libft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SRCS_BONUS = ft_lstnew.c ft_lstadd_front.c ft_lstsize.c ft_lstlast.c \
ft_lstiter.c ft_lstmap.c

CC = cc
CC_FLAGS = -Wall -Werror -Wextra
CC_FLAGS = -Wall -Werror -Wextra -O3
RM = rm -rf

NAME = libft.a
Expand Down
3 changes: 2 additions & 1 deletion libft/ft_printf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ S_FILES_BONUS = ft_printf_bonus.c \

SRC_OBJ = $(subst src, obj, $(SRCS:.c=.o))

CFLAGS = -Wall -Wextra -Werror
CC = cc
CFLAGS = -Wall -Wextra -Werror -O3
RM = rm -rf

all: $(NAME)
Expand Down
10 changes: 7 additions & 3 deletions libft/gnl/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
NAME = ../libft.a

SRC = get_next_line_bonus.c get_next_line_utils_bonus.c
GNL_OBJ = $(SRC:.c=.o)
GNL_OBJ = $(SRC:.c=.o)

CC = cc
CFLAGS = -Wall -Wextra -Werror -O3
RM = rm -rf

all: $(NAME)

$(NAME): $(GNL_OBJ)
$(NAME): $(GNL_OBJ)

%.o: %.c
$(CC) -c $< -o $@
$(CC) $(CFLAGS) -c $< -o $@
ar -rcs $(NAME) $@

clean:
Expand Down
4 changes: 2 additions & 2 deletions libft/gnl/get_next_line_bonus.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: yde-goes <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/30 22:12:25 by yde-goes #+# #+# */
/* Updated: 2022/09/06 20:54:14 by yde-goes ### ########.fr */
/* Updated: 2022/09/23 23:32:00 by yde-goes ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -18,7 +18,7 @@
# endif

# ifndef BUFFER_SIZE
# define BUFFER_SIZE 1
# define BUFFER_SIZE 4096
# endif

# include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: yde-goes <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/08/29 04:56:14 by yde-goes #+# #+# */
/* Updated: 2022/09/06 23:50:14 by yde-goes ### ########.fr */
/* Updated: 2022/09/09 22:25:38 by yde-goes ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down

0 comments on commit 6d8453b

Please sign in to comment.