-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
66 lines (61 loc) · 2.37 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright (C) 2015 Metamolecular, LLC.
# Licensed under the terms of the
# IUPAC/InChI-Trust InChI Licence No. 1.0.
CC = emcc
EXPORTED = -s EXPORTED_FUNCTIONS="['_molfile_to_inchi', '_inchi_to_key']"
MEMORY = -s ALLOW_MEMORY_GROWTH=1
MAIN = submod/inchi/INCHI_API/inchi_main/
DLL = submod/inchi/INCHI_API/inchi_dll/
COMMON = submod/inchi/INCHI/common/
INCHI_MAIN = submod/inchi/INCHI_API/inchi_main/
BUILD = build
INCHI = src/inchi.c
INCHIJS = $(BUILD)/inchi.js
MAIN_SOURCES = $(MAIN)e_mol2atom.c \
$(MAIN)e_util.c \
$(MAIN)e_readmol.c \
$(MAIN)e_inchi_atom.c \
$(MAIN)e_ichi_io.c
DLL_SOURCES = $(DLL)inchi_dll.c \
$(DLL)ichiprt2.c \
$(DLL)ichiprt1.c \
$(DLL)ichimak2.c \
$(DLL)ichiprt3.c \
$(DLL)ichicano.c \
$(DLL)ichican2.c \
$(DLL)ichimap1.c \
$(DLL)ichimap2.c \
$(DLL)ichimap4.c \
$(DLL)runichi.c \
$(DLL)ichimake.c \
$(DLL)strutil.c \
$(DLL)ichisort.c \
$(DLL)ichi_io.c \
$(DLL)ichinorm.c \
$(DLL)ichicans.c \
$(DLL)ichitaut.c \
$(DLL)ichister.c \
$(DLL)ichiring.c \
$(DLL)ichi_bns.c \
$(DLL)ichiqueu.c \
$(DLL)ichiisot.c \
$(DLL)ichiparm.c \
$(DLL)ichilnct.c \
$(DLL)ikey_base26.c \
$(DLL)ikey_dll.c \
$(DLL)sha2.c \
$(DLL)util.c
production: rawjs node
@echo "(function(){" > $(INCHIJS).tmp
@cat $(INCHIJS) >> $(INCHIJS).tmp
@echo "})()" >> $(INCHIJS).tmp
@mv $(INCHIJS).tmp $(INCHIJS)
node:
mkdir -p $(BUILD)
$(CC) --memory-init-file 0 -I $(COMMON) -I $(INCHI_MAIN) $(INCHI) $(MAIN_SOURCES) $(DLL_SOURCES) $(EXPORTED) $(MEMORY) -o $(BUILD)/inchi-node.js -Oz -s EXPORT_NAME="'InChI'" --closure 1 -s NO_FILESYSTEM=1
rawjs:
mkdir -p $(BUILD)
$(CC) -I $(COMMON) -I $(INCHI_MAIN) $(INCHI) $(MAIN_SOURCES) $(DLL_SOURCES) $(EXPORTED) $(MEMORY) -o $(BUILD)/inchi.js -s -Oz -s EXPORT_NAME="'InChI'" --closure 1 -s NO_FILESYSTEM=1
debug:
mkdir -p $(BUILD)
$(CC) -I $(COMMON) -I $(INCHI_MAIN) $(INCHI) $(MAIN_SOURCES) $(DLL_SOURCES) $(EXPORTED) $(MEMORY) -o $(BUILD)/inchi.js -s ASSERTIONS=1