# Copyright 2009, 2010 IPOL Image Processing On Line http://www.ipol.im/
# Author: Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
# Author: Bruno Galerne
#
# 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.

CSRC	= io_png.c mt.c random_phase_noise_lib.c random_phase_noise.c

SRC	= $(CSRC)
OBJ	= $(CSRC:.c=.o)
BIN	= random_phase_noise

COPT	= -O3 -funroll-loops -fomit-frame-pointer
CFLAGS	+= -ansi $(COPT)

default: $(BIN)

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

$(BIN)	: $(OBJ)
	$(CC) $(CFLAGS) -o $@ $^ -lpng -lfftw3f -lm


.PHONY	: clean distclean
clean	:
	$(RM) $(OBJ)
distclean	: clean
	$(RM) $(BIN)
