Last active
August 29, 2015 14:08
-
-
Save hduffddybz/82bc9a11a1eef8467466 to your computer and use it in GitHub Desktop.
the universal usage of 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
SRCS = $(wildcard *.c) | |
OBJS = $(SRCS:.c = .o) | |
CC = gcc | |
CCFLAGS = -g -Wall -O0 | |
target = ringBuffer_test | |
$(target): $(OBJS) | |
$(CC) $^ -o $@ $(CCFLAGS) | |
%.o : %.c | |
$(CC) -c $< $(CCFLAGS) | |
clean: | |
rm $(OBJS) $(target) | |
.PHONY:clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment