save
This commit is contained in:
parent
482f88b455
commit
298ab747a2
5 changed files with 46 additions and 0 deletions
33
Makefile
Normal file
33
Makefile
Normal file
|
@ -0,0 +1,33 @@
|
|||
# The interesting part
|
||||
NAME = test
|
||||
SRCS = src/
|
||||
INCLUDES = includes/
|
||||
CODE = main
|
||||
LIBRARIES = mlx
|
||||
LINK=Xext X11 m z
|
||||
|
||||
# It works and I probably won't change it for the rest of my life
|
||||
C_FILES = $(addsuffix .c,$(addprefix $(SRCS),$(CODE)))
|
||||
O_FILES = $(addsuffix .o,$(addprefix $(SRCS),$(CODE)))
|
||||
CC = cc -Wall -Wextra -Werror
|
||||
|
||||
all : $(NAME)
|
||||
|
||||
$(NAME) : $(O_FILES) $(LIBRARIES)
|
||||
$(CC) -o $(NAME) $(O_FILES) $(addprefix -L ,$(LIBRARIES)) $(addprefix -l ,$(LIBRARIES) $(LINK))
|
||||
|
||||
$(LIBRARIES) :
|
||||
true $(addprefix && make -C ,$(LIBRARIES))
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(addprefix -I ,$(INCLUDES) $(LIBRARIES)) -c $< -o $@
|
||||
|
||||
clean :
|
||||
rm -f $(O_FILES)
|
||||
|
||||
fclean : clean
|
||||
rm -f $(NAME)
|
||||
|
||||
re : fclean all
|
||||
|
||||
.PHONY : all clean fclean re $(LIBRARIES)
|
BIN
minilibx-linux.tgz
Normal file
BIN
minilibx-linux.tgz
Normal file
Binary file not shown.
1
mlx
Submodule
1
mlx
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 7dc53a411a7d4ae286c60c6229bd1e395b0efb82
|
12
src/main.c
Normal file
12
src/main.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "mlx.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
void *mlx;
|
||||
void *win;
|
||||
|
||||
mlx = mlx_init();
|
||||
win = mlx_new_window(mlx, 600, 400, "UNDRETALE");
|
||||
(void)win;
|
||||
mlx_loop(mlx);
|
||||
}
|
BIN
test
Normal file
BIN
test
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue