# Included distributions:
# 1. experimental
# 2. normal
# 3. pareto
# 4. paretonormal

include ../../Config

ifeq ($(strip $(DISTRIBUTION)),)
	DISTRIBUTION= -DUSE_EXPERIMENTAL -DDISTRIBUTION_NAME="\"experimental\""
endif

CFLAGS= $(DISTRIBUTION) -I./ -I../ -I../../include -g

all: testtable testrandom teststats testunmustats testunsigmastats testconv

install: all

tabledist.o:	../tabledist.c
	$(CC) $(CFLAGS) -c ../tabledist.c

testtable:	testtable.o tabledist.o ../random.o
	$(CC) $(CFLAGS) -o testtable testtable.o tabledist.o ../random.o -lm

testconv:	testconv.o tabledist.o ../random.o
	$(CC) $(CFLAGS) -o testconv testconv.o tabledist.o ../random.o -lm

testrandom:	testrandom.o tabledist.o ../random.o
	$(CC) $(CFLAGS) -o testrandom testrandom.o tabledist.o ../random.o -lm

teststats:	teststats.o tabledist.o ../random.o ../libstats.o
	$(CC) $(CFLAGS) -o teststats teststats.o tabledist.o ../random.o ../libstats.o -lm

testunsigmastats:	teststats.o unsigmacortabledist.o ../random.o ../libstats.o
	$(CC) -DNO_SIGMA_CORR $(CFLAGS) -USIGMA_CORR -o testunsigmastats teststats.c unsigmacortabledist.o ../random.o ../libstats.o -lm

testunmustats:	teststats.o unmucortabledist.o ../random.o ../libstats.o
	$(CC) -DNO_MU_CORR $(CFLAGS) -UMU_CORR -o testunmustats teststats.c unmucortabledist.o ../random.o ../libstats.o -lm

unsigmacortabledist.o: ../tabledist.c
	$(CC) $(CFLAGS) -DNO_SIGMA_CORR -o unsigmacortabledist.o -c ../tabledist.c

unmucortabledist.o: ../tabledist.c
	$(CC) $(CFLAGS) -DNO_MU_CORR -o unmucortabledist.o -c ../tabledist.c

clean:
	-rm -f *.o testtable testrandom teststats testunsigmastats testunmustats testconv
