-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
32 lines (27 loc) · 999 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
26
27
28
29
30
31
32
export DOCKER_BUILDKIT=0
DEPS_OUT = $(PWD)/dist
CFLAGS=-I$(DEPS_OUT)/include -L$(DEPS_OUT)/lib
all: $(DEPS_OUT)/lib/libgmp.a $(DEPS_OUT)/lib/libcob.a
$(DEPS_OUT)/lib/libgmp.a:
cd ./deps/gmp.js && \
emconfigure ./configure --disable-assembly --host none --build none \
--enable-cxx \
--prefix=$(DEPS_OUT)
make -C ./deps/gmp.js
make -C ./deps/gmp.js install
$(DEPS_OUT)/lib/libcob.a: $(DEPS_OUT)/lib/libgmp.a
cd ./deps/gnucobol-2.2 && \
emconfigure ./configure --host none --build none \
--without-db CFLAGS="$(CFLAGS)" \
--disable-assembly --with-gmp=$(DEPS_OUT) --prefix=$(DEPS_OUT)
make -C ./deps/gnucobol-2.2 CFLAGS="$(CFLAGS)" libcob
make -C ./deps/gnucobol-2.2/libcob install
cp ./deps/gnucobol-2.2/libcob.h $(DEPS_OUT)/include
clean:
make -C ./deps/gmp.js clean || true
make -C ./deps/gnucobol-2.2 clean || true
rm -rf deps/gnucobol-2.2/cobc/*.o
rm -rf deps/gnucobol-2.2/libcob/.deps
rm -rf deps/gnucobol-2.2/config.log
build-docker:
docker build -t xtuc/cobweb .