Last active
November 3, 2022 21:37
-
-
Save bvpav/3a8a2a00131886db8dedc768c0ac3fb3 to your computer and use it in GitHub Desktop.
Примерни Makefile-ове
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# това е коментар | |
# всичко тук отдолу се наричат рецепти | |
# на английски език, структурата на една рецепта: | |
target: prerequisite1 [prerequisite2 ...] | |
command1 | |
[command2 ...] | |
#^^^ имай предвид, че тази индентация тук е задължителна - с нея разбира, че това е част от рецептата | |
# ЗАДЪЛЖИТЕЛНО използваш tab тук за индентация. интервали не работят. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Бележка: може би би желал да използваш по-дълга команда за компилиране, като включиш неща като -Wall -Werror ... | |
tictactoe: main.o find_best_move.o evaluate_move.o find_empty.o print_board.o | |
gcc main.o find_best_move.o evaluate_move.o find_empty.o print_board.o -o tictactoe | |
main.o: main.c | |
gcc -c main.c -o main.o | |
find_best_move.o: find_best_move.c | |
gcc -c find_best_move.c -o find_best_move.o | |
evaluate_move.o: evaluate_move.c | |
gcc -c evaluate_move.c -o evaluate_move.o | |
find_empty.o: find_empty.c | |
gcc -c find_empty.c -o find_empty.o | |
print_board.o: print_board.c | |
gcc -c print_board.c -o print_board.o | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment