summaryrefslogtreecommitdiffstats
path: root/tmp/player/Makefile
blob: b99d03af3b6a84f206074bdffca7b28695a3e266 (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#! /usr/bin/make -f

################################################################################
# Copyright (C) 2019	Alejandro Colomar Andrés
# SPDX-License-Identifier:	GPL-2.0-only
################################################################################
# *AUTHOR*
# FULL NAME	"Alejandro Colomar Andrés"
# EMAIL		"1903716@gmail.com"
################################################################################

################################################################################
# dependencies

OBJ		=							\
		clui.o							\
		tui.o							\
		iface.o

CLUI_INC	=							\
		$(INC_DIR)/mine-sweeper/player/clui.h			\
		$(INC_DIR)/mine-sweeper/game/iface.h			\
		$(INC_DIR)/mine-sweeper/player/iface.h
CLUI_SRC	=							\
		$(SRC_DIR)/player/clui.c

TUI_INC		=							\
		$(INC_DIR)/mine-sweeper/player/tui.h			\
		$(LIBALX_INC_DIR)/libalx/extra/ncurses/common.h		\
		$(LIBALX_INC_DIR)/libalx/extra/ncurses/get.h		\
		$(INC_DIR)/mine-sweeper/game/iface.h			\
		$(INC_DIR)/mine-sweeper/player/iface.h
TUI_SRC		=							\
		$(SRC_DIR)/player/tui.c

IFACE_INC	=							\
		$(INC_DIR)/mine-sweeper/player/iface.h			\
		$(INC_DIR)/mine-sweeper/game/iface.h			\
		$(INC_DIR)/mine-sweeper/player/clui.h			\
		$(INC_DIR)/mine-sweeper/player/tui.h
IFACE_SRC	=							\
		$(SRC_DIR)/player/iface.c

################################################################################
# target: dependencies
#	action

PHONY := all
all: $(OBJ)


clui.s: $(CLUI_SRC) $(CLUI_INC)
	@echo	"	CC	mine-sweeper/player/$@"
	$(Q)$(CC) $(CFLAGS) -S $< -o $@
clui.o: clui.s
	@echo	"	AS	mine-sweeper/player/$@"
	$(Q)$(AS) $< -o $@

tui.s: $(TUI_SRC) $(TUI_INC)
	@echo	"	CC	mine-sweeper/player/$@"
	$(Q)$(CC) $(CFLAGS) -S $< -o $@
tui.o: tui.s
	@echo	"	AS	mine-sweeper/player/$@"
	$(Q)$(AS) $< -o $@

iface.s: $(IFACE_SRC) $(IFACE_INC)
	@echo	"	CC	mine-sweeper/player/$@"
	$(Q)$(CC) $(CFLAGS) -S $< -o $@
iface.o: iface.s
	@echo	"	AS	mine-sweeper/player/$@"
	$(Q)$(AS) $< -o $@


PHONY += clean
clean:
	@echo	"	RM	*.o *.s"
	$(Q)rm -f *.o *.s

################################################################################
# Declare the contents of the .PHONY variable as phony.
.PHONY: $(PHONY)


################################################################################
######## End of file ###########################################################
################################################################################