-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (38 loc) · 1.55 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: atemfack <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/08/02 18:47:51 by atemfack #+# #+# #
#* Updated: 2020/08/02 21:24:18 by atemfack ### ########.fr *#
# #
# **************************************************************************** #
NAME = cub3d
UNAME := $(shell uname)
IMAGE = screenshot.bmp
MAC_VERSION_FILE = mac_version
LINUX_VERSION_FILE = linux_version
# TODO: Implement a better OS checker
ifeq ($(UNAME), Linux)
VERSION_FILE = $(LINUX_VERSION_FILE)
else
VERSION_FILE = $(MAC_VERSION_FILE)
endif
RM = rm -f
all: $(NAME)
$(NAME):
@$(MAKE) -C $(VERSION_FILE)
@cp $(VERSION_FILE)/$(NAME) .
docker:
@docker build -t cub3d .
@docker run --rm -v $(PWD):/cub3d cub3d
clean:
@$(MAKE) -C $(VERSION_FILE) fclean
$(RM) $(IMAGE)
fclean: clean
$(RM) $(NAME)
re: fclean $(NAME)
f: all clean
.PHONY: all clean docker fclean re f