diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2020-03-11 18:59:58 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2020-03-11 18:59:58 +0100 |
commit | b6388b5101d8187f746f91c89842e932a1d01cb6 (patch) | |
tree | 70bd9ba7012f5906db01b485ec8f58f5a4697240 /minilibx_beta/Makefile | |
parent | close but no cigar (diff) | |
parent | ca tue (diff) | |
download | 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.gz 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.bz2 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.xz 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.zst 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.zip |
get merged
Diffstat (limited to '')
-rw-r--r-- | minilibx_beta/Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
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 *~ + |