Created
March 11, 2019 12:17
-
-
Save tinylucid/d68f3eb4ab8258a71658964adc38ef0e to your computer and use it in GitHub Desktop.
minimal c makefile template
This file contains 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
CC = gcc | |
DEBUG = -ggdb -O0 -march=native | |
CFLAGS := $(DEBUG) -W -Wall -Wextra -Wpedantic -pedantic -ansi | |
LDLIBS := -lm | |
OUTPUT_OPTION = -MMD -MP -o $@ | |
SRC := $(wildcard *.c) | |
OBJ := $(SRC:.c=.o) | |
DEP := $(SRC:.c=.d) | |
-include $(DEP) | |
.PHONY: clean | |
all: test1 | |
test1: test1.o | |
clean: | |
-rm -f $(OBJ) $(DEP) test1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment