move the math functions to a separate file; remove dependency on GSL due to license

This commit is contained in:
Kevin Keogh
2017-04-02 21:11:51 -04:00
parent d793ecb2fe
commit a8a96ba17a
6 changed files with 76 additions and 26 deletions

View File

@@ -1,9 +1,9 @@
CC=gcc
CFLAGS=-Wall -fPIC -O3 -ansi -pedantic-errors
LDFLAGS=-lgsl -lcblas -lm
LDFLAGS=-lcblas -lm
PREFIX= /usr/local
opt-pricer : src/opt-pricer.c gbm.o black_scholes.o
opt-pricer : src/opt-pricer.c gbm.o black_scholes.o utils.o
@$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
gbm.o : src/gbm_mc.c
@@ -12,6 +12,9 @@ gbm.o : src/gbm_mc.c
black_scholes.o : src/black_scholes.c
@$(CC) $(CFLAGS) -c $^ $(LDFLAGS) -o $@
utils.o : src/utils.c
@$(CC) $(CFLAGS) -c $^ $(LDFLAGS) -o $@
.PHONY: install
install : opt-pricer
@mkdir -p $(DESTDIR)$(PREFIX)/bin
@@ -24,4 +27,4 @@ uninstall :
.PHONY: clean
clean :
@rm -f gbm.o black_scholes.o
@rm -f gbm.o black_scholes.o utils.o