Skip to content

Instantly share code, notes, and snippets.

@harryhanYuhao
Created August 2, 2023 12:25
Show Gist options
  • Save harryhanYuhao/e70e266db700d3b50dee6860d249927e to your computer and use it in GitHub Desktop.
Save harryhanYuhao/e70e266db700d3b50dee6860d249927e to your computer and use it in GitHub Desktop.
clang makefile
CC=clang
CWARNINGS=-Wall -Wextra -Wpedantic -Wshadow -Wpointer-arith -Wcast-align \
COPTIMISING=-O0 -ggdb3 -fno-omit-frame-pointer -fno-common -fstrict-aliasing
CFLAGS=-std=c11 $(CWARNINGS) $(COPTIMISING)
INSTALL_DIR=$(HOME)/psu/bin
# Auxillary Variables
RED=\033[0;31m
BLUE=\033[0;34m
NC=\033[0m
a.out
@echo -e "------------------------------------------"
@echo -e "$(BLUE)Linking: Producing executable$(NC)"
@$(CC) $(CFLAGS) -o a.out main.c
@echo -e "------------------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment