forked from usnistgov/libhdf5-wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (20 loc) · 854 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
WASM_BUILD_DIR = wasm_build
HDF5_VERSIONS = 1_12_2 1_14_1 1_10_10
INSTALL_PATHS = $(patsubst %, $(WASM_BUILD_DIR)/%/hdf5, $(HDF5_VERSIONS))
TARBALLS = $(patsubst %, libhdf5-%-wasm.tar.gz, $(HDF5_VERSIONS))
all: $(INSTALL_PATHS)
release: $(TARBALLS)
$(WASM_BUILD_DIR)/%/hdf5: VERSION=$(*)
$(WASM_BUILD_DIR)/%/hdf5:
mkdir -p $(WASM_BUILD_DIR)/$(VERSION);
cd $(WASM_BUILD_DIR)/$(VERSION) && emcmake cmake ../../ -DHDF5_VERSION=$(VERSION);
cd $(WASM_BUILD_DIR)/$(VERSION) && emmake make -j8 install;
libhdf5-%-wasm.tar.gz: VERSION=$(*)
libhdf5-%-wasm.tar.gz: $(WASM_BUILD_DIR)/%/hdf5
cp CMakeLists_dist.txt $(WASM_BUILD_DIR)/$(VERSION)/hdf5/CMakeLists.txt;
cd $(WASM_BUILD_DIR)/$(VERSION)/hdf5 && tar -czvf ../../../$@ *;
shasum: $(TARBALLS)
@for t in $(TARBALLS); do shasum -a 256 $$t; done;
clean:
rm -rf $(WASM_BUILD_DIR);
rm -f $(TARBALLS);