Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kodokaii authored Jan 22, 2024
1 parent 0e38d1e commit f24e604
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,54 @@ To hide memory leaks from external libraries, add a .valgrindrc file to the repo
--show-leak-kinds=all
--suppressions=minilibx/mlx42.supp
```

Makefile exemple:

```
NAME =
CC = cc
RM = rm -f
CLONE = git clone --depth=1
CFLAGS += -Wall -Wextra -Werror -O3
CLINKS = -ldl -lglfw -pthread -lm
MLX = minilibx
LIBMLX = $(MLX)/libmlx42.a
SRC =
OBJ = $(SRC:.c=.o)
all: $(NAME)
bonus: $(NAME)
$(NAME): $(LIBMLX) $(OBJ)
$(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(LIBMLX) $(CLINKS)
$(LIBMLX): $(MLX)
$(MAKE) -C $(MLX)
$(MLX):
cmake $(MLX) -B $(MLX)
$(CLONE) https://github.com/kodokaii/MLX42.git $(MLX)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
$(RM) $(OBJ)
$(MAKE) clean -C $(MLX)
fclean: clean
$(RM) $(LIBMLX)
$(RM) $(NAME)
clear: fclean
$(RM) -r $(MLX)
re: fclean all
.PHONY: all bonus clear clean fclean re
```

0 comments on commit f24e604

Please sign in to comment.