blob: 722172b57472e0c5d4b6a3123d0970d7c69524e8 (
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
|
#! /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 = \
save.o \
score.o
SAVE_INC = \
$(INC_DIR)/mine-sweeper/save/save.h \
$(LIBALX_INC_DIR)/libalx/base/errno/perror.h \
$(LIBALX_INC_DIR)/libalx/base/stdio/wait.h \
$(INC_DIR)/mine-sweeper/game/core.h \
$(INC_DIR)/mine-sweeper/player/iface.h
SAVE_SRC = \
$(SRC_DIR)/save/save.c
SCORE_INC = \
$(INC_DIR)/mine-sweeper/save/score.h \
$(LIBALX_INC_DIR)/libalx/base/errno/perror.h \
$(LIBALX_INC_DIR)/libalx/base/stddef/size.h \
$(LIBALX_INC_DIR)/libalx/base/stdio/wait.h \
$(INC_DIR)/mine-sweeper/game/core.h \
$(INC_DIR)/mine-sweeper/game/iface.h \
$(INC_DIR)/mine-sweeper/player/iface.h
SCORE_SRC = \
$(SRC_DIR)/save/score.c
################################################################################
# target: dependencies
# action
PHONY := all
all: $(OBJ)
save.s: $(SAVE_SRC) $(SAVE_INC)
@echo " CC mine-sweeper/save/$@"
$(Q)$(CC) $(CFLAGS) -S $< -o $@
save.o: save.s
@echo " AS mine-sweeper/save/$@"
$(Q)$(AS) $< -o $@
score.s: $(SCORE_SRC) $(SCORE_INC)
@echo " CC mine-sweeper/save/$@"
$(Q)$(CC) $(CFLAGS) -S $< -o $@
score.o: score.s
@echo " AS mine-sweeper/save/$@"
$(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 ###########################################################
################################################################################
|