# Anonymized
# Submission to the EGSR 2016, paper1001
# Date: 12/March/2016
# Paper title: "Perceptually Motivated BRDF Comparison using Single Image"
#
# Makefile for compilation of C++/C programs
#
BACKUPPATH = backup
TOBACKUP = *.cpp *.h Makefile *.bat *.txt *.hdr
PROGRAM = brdfDist
INCLUDE	= -I.
COMPILE = gcc $(INCLUDE) -O2 -pipe -Wno-write-strings
#COMPILE = gcc $(INCLUDE) -O0 -g -pipe -Wno-write-strings

LINKER = g++ $(INCLUDE) -g

OBJECTS= pngwrite.o hdrwrite.o TAlloc.o SSIM.o arrayS2.o arrayS3.o tbrdf.o timer.o main.o

# You may need to change the location of libpng12 library
# https://sourceforge.net/projects/libpng/files/libpng12/
LIBDIR  = /usr/lib/x86_64-linux-gnu/
LIB= -L$(LIBDIR) -lpng12 -lm

all: $(PROGRAM)

brdfDist: $(OBJECTS)
	$(LINKER) -o  $@ $(OBJECTS) $(LIB) 

clean:
	rm -rf $(OBJECTS) $(PROGRAM)

.cpp.o:
	$(COMPILE) -o $@ -c $<

zip:
	zip -9  $(BACKUPPATH)/$(PROGRAM)_src_`date +%Y-%m-%d-%H.%M`.zip $(TOBACKUP)
