-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch.mk
31 lines (26 loc) · 1.23 KB
/
fetch.mk
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
$(if $(FETCH_DIR),,$(error fetch.mk requires fetch dir))
# Localise all the pulling files from the internet during build here
# The ifeq/endif logic is a little obscure. The idea is that we don't especially want
# to download the files again if this makefile changes. The ifeq is parsed when reading
# this makefile which is approximately the start of the build. If the files were missing,
# go and get them. Otherwise assume whatever is already on disk is fine and leave it alone.
fetch:: $(FETCH_DIR)/EvilUnit/EvilUnit.h
ifeq (,$(wildcard $(FETCH_DIR)/EvilUnit/EvilUnit.h))
$(FETCH_DIR)/EvilUnit/EvilUnit.h:
@rm -rf $(FETCH_DIR)/EvilUnit
git clone https://github.com/JonChesterfield/EvilUnit.git $(FETCH_DIR)/EvilUnit
endif
fetch:: $(FETCH_DIR)/lua/lua.tar.gz
ifeq (,$(wildcard $(FETCH_DIR)/lua/lua.tar.gz))
$(FETCH_DIR)/lua/lua.tar.gz:
@rm -rf $(FETCH_DIR)/lua
@mkdir -p $(FETCH_DIR)/lua
wget https://www.lua.org/ftp/lua-5.4.7.tar.gz -O $@
endif
fetch:: $(FETCH_DIR)/libtommath/libtommath.zip
ifeq (,$(wildcard $(FETCH_DIR)/libtommath/libtommath.zip))
$(FETCH_DIR)/libtommath/libtommath.zip:
@rm -rf $(FETCH_DIR)/libtommath
@mkdir -p $(FETCH_DIR)/libtommath
wget https://github.com/libtom/libtommath/archive/refs/tags/v1.3.0.zip -O $@
endif