MLX42 is a performant, easy to use, cross-platform, minimal windowing graphics library to create graphical applications without having to work directly with the native windowing framework of the given operating system.
It provides primitive tools to draw textures onto the window as well as modifying them at runtime as they get displayed on the window.
this fork is to adapt the lib to the computer of 42 Le Havre
To hide memory leaks from external libraries, add a .valgrindrc file to the repository root.
--keep-debuginfo=yes
--leak-check=full
--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):
$(CLONE) https://github.com/kodokaii/MLX42.git $(MLX)
cmake $(MLX) -B $(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