Skip to content

Instantly share code, notes, and snippets.

@mb6ockatf
Last active February 4, 2024 17:34
Show Gist options
  • Save mb6ockatf/f72ea2bc9cc92dcbb83bb2afc61416af to your computer and use it in GitHub Desktop.
Save mb6ockatf/f72ea2bc9cc92dcbb83bb2afc61416af to your computer and use it in GitHub Desktop.
broken makefile
#!/usr/bin/make -f
cc = gcc
cc_standard = -std=c17
cc_optimization = -Ofast -march=native
cc_warnings = -Werror -Wall -Wextra -Wpedantic -Wshadow -Wconversion \
-Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -g
cc_link = -lgmp
target_file?=main.c
build:
${cc} ${cc_standard} ${cc_optimization} ${cc_warnings} ${target_file} -o \
$@ ${cc_link}
.PHONY: clean
style:
astyle -rv --style=linux --indent=force-tab=4 --delete-empty-lines \
--break-closing-braces --max-code-length=80 --lineend=linux --ascii \
"*.c"
clean:
rm -rf main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment