From 650e83573987d004171f250e236b21b243477355 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 14:57:54 +0100 Subject: is not working --- minilibx_beta/Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 minilibx_beta/Makefile (limited to 'minilibx_beta/Makefile') diff --git a/minilibx_beta/Makefile b/minilibx_beta/Makefile new file mode 100644 index 0000000..39c36f4 --- /dev/null +++ b/minilibx_beta/Makefile @@ -0,0 +1,34 @@ + + + +MODULE_SRC= mlx_image.swift mlx_window.swift mlx_init.swift +MODULE_OBJ=$(MODULE_SRC:.swift=.swiftmodule) + +SRC= interface.swift $(MODULE_SRC) +OBJ=$(SRC:.swift=.o) + +C_SRC= mlx_xpm.c mlx_png.c mlx_string_put.c +C_OBJ=$(C_SRC:.c=.o) +CFLAGS=-O3 + +NAME=libmlx.dylib + +INC=-I. +#OPTI=-Ounchecked + +all: $(NAME) + +$(NAME): $(MODULE_OBJ) $(OBJ) $(C_OBJ) + swiftc $(OPTI) $(INC) -o $(NAME) -emit-library $(OBJ) $(C_OBJ) -lz + + + +%.o: %.swift + swiftc $(OPTI) $(INC) -parse-as-library -c $< -o $@ + +%.swiftmodule: %.swift + swiftc $(OPTI) $(INC) -parse-as-library -c $< -o $@ -emit-module -module-name $(patsubst %.swift,%,$<) -module-link-name $(patsubst %.swift,%,$<) + +clean: + rm -f $(NAME) $(OBJ) $(MODULE_OBJ) $(C_OBJ) *.swiftdoc *~ + -- cgit v1.2.3