]> pd.if.org Git - afpopgen/blob - sim/Makefile
9230ef94addc5b9d92f8ed5b9c9a2a65f04cd0c3
[afpopgen] / sim / Makefile
1 CFLAGS=-Wall -Wno-format -I/opt/local/include -Ihexagon 
2 LDFLAGS=-L/opt/local/lib -Lhexagon
3 LIBS=-lgsl -lhexagon -lm -lgslcblas
4
5 all: sim hexverts
6
7 sim.o: | hexagon.h
8
9 sim: africa.o sim.o climate.o map.o variate.o | variate.h hexagon/libhexagon.a
10         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
11
12 hexverts: hexverts.o | hexagon/libhexagon.a
13         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lhexagon -lm
14
15 hexagon.h: hexagon
16 hexagon:
17         git clone https://pd.if.org/git/hexagon
18
19 hexagon/libhexagon.a: hexagon
20         make -C hexagon libhexagon.a
21
22 clean:
23         rm -f *.o sim hexagon/libhexagon.a hexverts