summaryrefslogtreecommitdiffstats
path: root/tmp/Makefile
blob: ad488ee51b4f0bf3036223ecfcdd1de3670a0aea (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
87
88
89
90
91
92
93
94
#! /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		=							\
		main.o

MAIN_INC	=							\
		$(INC_DIR)/mine-sweeper/about/about.h			\
		$(INC_DIR)/mine-sweeper/ctrl/start.h			\
		$(INC_DIR)/mine-sweeper/game/core.h			\
		$(INC_DIR)/mine-sweeper/menu/iface.h			\
		$(INC_DIR)/mine-sweeper/menu/parser.h			\
		$(INC_DIR)/mine-sweeper/player/iface.h			\
		$(INC_DIR)/mine-sweeper/save/save.h			\
		$(INC_DIR)/mine-sweeper/save/score.h
MAIN_SRC	=							\
		$(SRC_DIR)/main.c


# target: dependencies
#	action

PHONY := all
all: $(OBJ) about ctrl game menu player save xyzzy


PHONY += about
about:
	@echo	"	MAKE	tmp/$@"
	$(Q)$(MAKE)	-C $(TMP_DIR)/$@/

PHONY += ctrl
ctrl:
	@echo	"	MAKE	tmp/$@"
	$(Q)$(MAKE)	-C $(TMP_DIR)/$@/

PHONY += game
game:
	@echo	"	MAKE	tmp/$@"
	$(Q)$(MAKE)	-C $(TMP_DIR)/$@/

PHONY += menu
menu:
	@echo	"	MAKE	tmp/$@"
	$(Q)$(MAKE)	-C $(TMP_DIR)/$@/

PHONY += player
player:
	@echo	"	MAKE	tmp/$@"
	$(Q)$(MAKE)	-C $(TMP_DIR)/$@/

PHONY += save
save:
	@echo	"	MAKE	tmp/$@"
	$(Q)$(MAKE)	-C $(TMP_DIR)/$@/

PHONY += xyzzy
xyzzy:
	@echo	"	MAKE	tmp/$@"
	$(Q)$(MAKE)	-C $(TMP_DIR)/$@/


main.s: $(MAIN_SRC) $(MAIN_INC)
	@echo	"	CC	mine-sweeper/tmp/$@"
	$(Q)$(CC) $(CFLAGS) -S $< -o $@
main.o: main.s
	@echo	"	AS	mine-sweeper/tmp/$@"
	$(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 ###########################################################
################################################################################