automatic download of data files master
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 17 Feb 2024 11:50:32 +0000 (13:50 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 17 Feb 2024 11:50:32 +0000 (13:50 +0200)
.gitignore
Makefile

index 22d3be1..9bfe508 100644 (file)
@@ -8,3 +8,5 @@ misc/
 textures/
 *.sit
 score.txt
+*.zip
+saf_bench
index 4b469d6..55011a8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,24 @@
 obj = saf_bench.o j35_draken.o tu_95.o bmp_alpha.o runway.o skybox1.o \
          skybox2.o ground2.o digits.o menus.o
 bin = saf_bench
+data_url = http://mutantstargoat.com/~nuclear/saf_bench_data.zip
 
 CXX = g++
 CXXFLAGS = -O3 -ffast-math
 LDFLAGS = -lGL -lGLU -lglut
 
+.PHONY: all
+all: $(bin) textures/draken/j35_draken.bmp
+
 $(bin): $(obj)
        $(CXX) -o $@ $(obj) $(LDFLAGS)
 
+textures/draken/j35_draken.bmp: saf_bench_data.zip
+
+saf_bench_data.zip:
+       wget $(data_url) || curl -o $@ $(data_url)
+       unzip -o $@
+
 .PHONY: clean
 clean:
        rm -f $(obj) $(bin)