-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (35 loc) · 1.25 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
CC = gcc
MOVE_TO_DB = cd not-redis
MOVE_TO_KOMPILE = cd compiler
MOVE_TO_SHELL = cd shell
MOVE_TO_TIC = cd toe-tac-tic
MOVE_TO_HANG = cd hangman
MOVE_TO_SNACKE = cd snacke
db: db_build
${MOVE_TO_DB} && ./command.out $(filter-out $@,$(MAKECMDGOALS))
db_build:
${MOVE_TO_DB} && ${CC} command.c -o command.out -Wall -Wextra -pedantic
%:
@:
kompile: kompile_build
${MOVE_TO_KOMPILE} && ./parser.out $(filter-out $@,$(MAKECMDGOALS))
kompile_build:
${MOVE_TO_KOMPILE} && ${CC} parser.c -o parser.out -Wall -Wextra -pedantic
shell: shell_build
${MOVE_TO_SHELL} && ./shell.out $(filter-out $@,$(MAKECMDGOALS))
shell_build:
${MOVE_TO_SHELL} && ${CC} shell.c -o shell.out -Wall -Wextra -pedantic
tic: tic_build
${MOVE_TO_TIC} && ./tic.out $(filter-out $@,$(MAKECMDGOALS))
tic_build:
${MOVE_TO_TIC} && ${CC} tic.c -o tic.out -Wall -Wextra -pedantic
hang: hang_build
${MOVE_TO_HANG} && ./hang.out $(filter-out $@,$(MAKECMDGOALS))
hang_build:
${MOVE_TO_HANG} && ${CC} hang.c -o hang.out -Wall -Wextra -pedantic
snacke: snacke_build
${MOVE_TO_SNACKE} && ./snacke.out $(filter-out $@,$(MAKECMDGOALS))
snacke_build:
${MOVE_TO_SNACKE} && ${CC} snacke.c -o snacke.out -Wall -Wextra -pedantic
clean:
rm -rf *.exe *.out *.o