# hilbert2d

CC = gcc

CFLAGS = -std=c99 -pedantic -g -Wall -Wextra

CFLAGS += -march=native -mtune=native -O2

libs = -lm

prog = hilbert2d

tst = hc_testing

.PHONY: all bldrun check clean mac-check win-check

.SILENT:

all: $(prog)

$(prog): $(addsuffix .c, $(prog))
	$(CC) $(CFLAGS) -o $@ $< $(libs)

mac-check: bldrun
	@echo TBI.

check: bldrun
	povray +a0.3 +w800 +h600 +i$(tst).inc_demo.pov

win-check: bldrun
	pvengine64 +a0.3 +w800 +h600 +i$(tst).inc_demo.pov

bldrun: $(prog)
	./hilbert2d -V
	@echo creating test include and scene.
	./hilbert2d -n4 -Sc -P3.6 -d.6 -w20 -ptest_ \
	  -s'<1,1,2>' -t'<3,5,7>' -Do$(tst) -v

clean:
	rm -f *~ $(tst)* $(prog)

# -------------------------------------------------------------- #
#  this file is part of the 'hilbert2d' utility.                 #
#  the content above is covered by the GPLv3+, see file COPYING. #
#  copyright (c) 2018 jr <creature.eternal@gmail.com>.           #
#  all rights reserved.                                          #
# -------------------------------------------------------------- #
