practice_localMaxima/c_impl/Makefile

21 lines
322 B
Makefile
Raw Normal View History

2021-02-19 00:35:53 +00:00
SOURCES = src/main.c
OBJECTS = $(subst .c,.o,$(SOURCES))
COMMON_FLAGS = -Wall -Wextra -Wpedantic
ifdef DEBUG
CFLAGS = $(COMMON_FLAGS) -O0 -g
else
CFLAGS = $(COMMON_FLAGS) -O3 -DNDEBUG
endif
all: LocalMaxima
LocalMaxima: $(OBJECTS)
$(CC) $(CFLAGS) -o LocalMaxima $^
.PHONY:
clean:
rm -f LocalMaxima
rm -f src/*.o