M2_SETI/A4/TP_A4/exo4_opti/Makefile

29 lines
463 B
Makefile
Raw Normal View History

2023-02-12 23:49:07 +01:00
CC=gcc
CCFLAGS=-Wall -std=c99 -fopenmp
LDFLAGS=-lm -fopenmp
SOURCES=$(wildcard *.c)
OBJECTS=$(SOURCES:.c=.o)
TARGET=ShiTomasi
all: debug
debug: CCFLAGS += -DDEBUG -g
debug: $(TARGET)
release: CCFLAGS += -O2
release: $(TARGET)
benchmode: CCFLAGS += -O2 -DBENCHMARKMODE
benchmode: $(TARGET)
$(TARGET): $(OBJECTS) $(CXXOBJECTS)
$(CC) -o $@ $^ $(LDFLAGS)
%.o: %.c %.h
$(CC) $(CCFLAGS) -c $<
%.o: %.c
$(CC) $(CCFLAGS) -c $<
clean:
rm -f *.pgm *.o $(TARGET)