CC=gcc-mp-10
CFITSIO_LIB=/Users/ejullo/softs/cfitsio
WCS_DIR=/Users/ejullo/softs/wcstools-3.8.3/libwcs
GSL_DIR=/opt/local/lib

OMP=-fopenmp
CFLAGS=$(OMP) -O0 -g -I../include -I/opt/local/include
LDFLAGS=-L../src -llenstool -L../liblt -llt -L$(CFITSIO_LIB) -lcfitsio -L$(WCS_DIR) -lwcs -L$(GSL_DIR) -lgsl -lgslcblas -lm

all: test_dierfc test_sigma_ap

test_dierfc: 
	$(CC) $(CFLAGS) -o test_dierfc test_dierfc.c $(LDFLAGS) 
	./test_dierfc

test_sigma_ap:
	$(CC) -shared $(CFLAGS) -o e_sigma_ap.so ../src/e_sigma_ap.o $(LDFLAGS)
	$(CC) $(CFLAGS) -o test_sigma_ap test_sigma_ap.c $(LDFLAGS) 

test_raninit:
	$(CC) $(CFLAGS) -o test_raninit test_raninit.c $(LDFLAGS) 

clean: 
	rm test_dierfc test_sigma_ap test_raninit
	rm *.o 
