Skip to content

Commit

Permalink
add gsl (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen authored Dec 21, 2023
1 parent 7eba2b8 commit 402d572
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions libs/recipes/gsl/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
GSL_VERSION = 2.7.1
GSL_TARBALL = $(DOWNLOAD)/gsl-$(GSL_VERSION).tar.gz
GSL_URL = https://ftp.gnu.org/gnu/gsl/gsl-$(GSL_VERSION).tar.gz

.PHONY: gsl
gsl: $(GSL_WASM_LIB)

$(GSL_TARBALL):
mkdir -p $(DOWNLOAD)
wget $(GSL_URL) -O $@

$(GSL_WASM_LIB): $(GSL_TARBALL)
mkdir -p $(BUILD)/gsl-$(GSL_VERSION)/build
tar -C $(BUILD) -xf $(GSL_TARBALL)
cd $(BUILD)/gsl-$(GSL_VERSION)/build && \
emconfigure ../configure \
--enable-shared=no \
--enable-static=yes \
--prefix=$(WASM) && \
emmake make &&\
emmake make install

2 changes: 2 additions & 0 deletions libs/recipes/gsl/targets.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GSL_WASM_LIB = $(WASM)/lib/libgsl.a
OPTIONAL_WASM_LIBS += $(GSL_WASM_LIB)

0 comments on commit 402d572

Please sign in to comment.