Write a simple UNIX cp clone
This commit is contained in:
19
exercises/coreutils/cp/Makefile
Normal file
19
exercises/coreutils/cp/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
CC := gcc
|
||||
CFLAGS := -Wall -Wextra -pedantic -std=c11 -pthread -g
|
||||
TARGET := cp
|
||||
SRC := main.c
|
||||
OBJS := $(SRC:.c=.o)
|
||||
|
||||
.PHONY: all clean valgrind
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJS)
|
||||
|
||||
Reference in New Issue
Block a user