-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (22 loc) · 1.2 KB
/
Copy pathMakefile
File metadata and controls
31 lines (22 loc) · 1.2 KB
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
.PHONY: all clean
FLAGS=-WCL4 -Wall -Wextra -pedantic -Isrc/
SDL_FLAGS=$(shell sdl2-config --cflags --libs)
#FLAGS+=-fsanitize=address -g
FLAGS+=-O3
rect: src/rect.c src/rect.h src/constants.h
gcc -c src/rect.c -o .build/rect.o $(FLAGS)
rtree: rect src/item.h src/rtree.c src/rtree.h src/constants.h
gcc -c src/rtree.c -o .build/rtree.o $(FLAGS)
quadtree: rect src/item.h src/competitors/quadtree.c src/competitors/quadtree.h
gcc -c src/competitors/quadtree.c -o .build/quadtree.o $(FLAGS)
cdataset: tool/cdataset.cpp tool/json.hpp
g++ tool/cdataset.cpp -o .build/cdataset.a $(FLAGS) -Itool/
demo: rtree quadtree demo/main.c demo/main.h demo/gfx.h demo/stb_image_write.h src/constants.h
gcc demo/main.c .build/quadtree.o .build/rtree.o .build/rect.o -o .build/main.a -Idemo/ $(FLAGS) $(SDL_FLAGS)
dynamic-vehicles: rtree demo/dynamic_vehicles.c demo/gfx.h demo/stb_image_write.h
gcc demo/dynamic_vehicles.c .build/rtree.o .build/rect.o -o .build/dynamic.a -Idemo/ $(FLAGS) $(SDL_FLAGS)
benchmark: rtree quadtree benchmark/main.c benchmark/main.h
gcc benchmark/main.c .build/rtree.o .build/quadtree.o .build/rect.o -o .build/benchmark.a -Ibenchmark/ $(FLAGS)
all: demo cdataset benchmark
clean:
rm -rf .build/