-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
80 lines (55 loc) · 1.95 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
67
68
69
70
71
72
73
74
75
76
77
78
79
CC = gcc
AR = ar
ARFLAGS = cr
override LDFLAGS = -lm
override CFLAGS += -Wall -fwrapv
ifeq ($(OS),Windows_NT)
override CFLAGS += -D_WIN32
RM = del
else
override LDFLAGS += -lX11 -pthread
#RM = rm
endif
.PHONY : all release debug libcubiomes clean
all: release
debug: CFLAGS += -DDEBUG -O0 -ggdb3
debug: libcubiomes find_lower_bits find_origin_quads find_multi_bases find_final_seeds find_rare_biomes
release: CFLAGS += -O3 -march=native
release: libcubiomes find_lower_bits find_origin_quads find_multi_bases find_final_seeds find_rare_biomes
libcubiomes: CFLAGS += -fPIC
libcubiomes: layers.o generator.o finders.o util.o
$(AR) $(ARFLAGS) libcubiomes.a $^
find_lower_bits: find_lower_bits.o layers.o generator.o finders.o
$(CC) -o $@ $^ $(LDFLAGS)
find_lower_bits.o: find_lower_bits.c
$(CC) -c $(CFLAGS) $<
find_origin_quads: find_origin_quads.o layers.o generator.o finders.o
$(CC) -o $@ $^ $(LDFLAGS)
find_origin_quads.o: find_origin_quads.c
$(CC) -c $(CFLAGS) $<
find_multi_bases: find_multi_bases.o layers.o generator.o finders.o nullspace_finders.o
$(CC) -o $@ $^ $(LDFLAGS)
find_multi_bases.o: find_multi_bases.c
$(CC) -c $(CFLAGS) $<
find_final_seeds: find_final_seeds.o layers.o generator.o finders.o nullspace_finders.o
$(CC) -o $@ $^ $(LDFLAGS)
find_final_seeds.o: find_final_seeds.c
$(CC) -c $(CFLAGS) $<
find_rare_biomes: find_rare_biomes.o layers.o generator.o finders.o
$(CC) -o $@ $^ $(LDFLAGS)
find_rare_biomes.o: find_rare_biomes.c
$(CC) -c $(CFLAGS) $<
nullspace_finders.o: nullspace_finders.c nullspace_finders.h
$(CC) -c $(CFLAGS) $<
xmapview.o: xmapview.c xmapview.h
$(CC) -c $(CFLAGS) $<
finders.o: finders.c finders.h
$(CC) -c $(CFLAGS) $<
generator.o: generator.c generator.h
$(CC) -c $(CFLAGS) $<
layers.o: layers.c layers.h
$(CC) -c $(CFLAGS) $<
util.o: util.c util.h
$(CC) -c $(CFLAGS) $<
clean:
$(RM) *.o libcubiomes.a find_lower_bits find_origin_quads find_multi_bases find_final_seeds find_rare_biomes