1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright 2016 Bruno Galerne, Arthur Leclaire
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved.  This file is
# offered as-is, without any warranty.

SRC=src/io_png.c src/gti.c

BIN=gti

OPTS= -O3 -ftree-vectorize -funroll-loops -fopenmp

CFLAGS= $(OPTS) -Wall -std=c99 -Wextra -pedantic

LDFLAGS= -lpng -lfftw3f_omp -lfftw3f -lgomp -lm


all: $(BIN)

$(BIN): $(SRC:.c=.o)
	$(CC) $(SRC:.c=.o) $(LDFLAGS) -o $(BIN)

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f $(FSRC:.c=.o)
	rm -f $(RSRC:.c=.o)
	rm -f $(FBIN)
	rm -f $(RBIN)