-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
79 lines (58 loc) · 2.1 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
include choose_mrbuild.mk
include $(MRBUILD_MK)/Makefile.common.header
PROJECT_NAME := horizonator
ABI_VERSION := 0
TAIL_VERSION := 1
LDLIBS += \
-lGLU -lGL -lepoxy -lglut \
-lfreeimage \
-lm \
-pthread
# for the annotator
LDLIBS += -lcairo -lswscale
CFLAGS += --std=gnu99
CCXXFLAGS += -Wno-missing-field-initializers
################# library ###############
LIB_SOURCES += horizonator-lib.c dem.c annotator.c
horizonator-lib.o: vertex.glsl.h geometry.glsl.h fragment.glsl.h
%.glsl.h: %.glsl
sed 's/.*/"&\\n"/g' $^ > [email protected] && mv [email protected] $@
EXTRA_CLEAN += *.glsl.h
################# standalone tool ###############
BIN_SOURCES += standalone.c
############### fltk tool #####################
BIN_SOURCES += horizonator.cc
FLORB_SOURCES := $(wildcard \
florb/*.cpp \
florb/*.cc \
florb/Fl/*.cpp)
FLORB_OBJECTS := $(addsuffix .o,$(basename $(FLORB_SOURCES)))
horizonator: $(FLORB_OBJECTS) slippymap-annotations.o
LDLIBS_FLORB := \
$(shell fltk-config --use-images --ldflags) \
$(shell curl-config --libs) \
$(shell pkg-config --libs libpng) \
$(shell pkg-config --libs tinyxml) \
-lboost_filesystem \
-lboost_system \
-lboost_thread \
-pthread
CXXFLAGS_FLORB := \
-Iflorb -Iflorb/Fl \
$(shell fltk-config --use-images --cxxflags) \
$(shell curl-config --cflags) \
$(shell pkg-config --cflags libpng) \
$(shell pkg-config --cflags tinyxml)
EXTRA_CLEAN += florb/*.o florb/Fl/*.o
horizonator.o slippymap-annotations.o $(FLORB_OBJECTS): CXXFLAGS += $(CXXFLAGS_FLORB)
horizonator: LDLIBS += $(LDLIBS_FLORB) -lfltk_gl -lfltk -lX11
florb/orb_mapctrl.o: CXXFLAGS += -Wno-empty-body
florb/orb_tilecache.o: CXXFLAGS += -Wno-unused-parameter
annotator.o: CFLAGS += -I/usr/include/cairo
horizonator-pywrap.o: CFLAGS += $(PY_MRBUILD_CFLAGS)
horizonator-pywrap.o: $(addsuffix .h,$(wildcard *.docstring))
horizonator$(PY_EXT_SUFFIX): horizonator-pywrap.o libhorizonator.so
$(PY_MRBUILD_LINKER) $(PY_MRBUILD_LDFLAGS) $^ -o $@
DIST_PY3_MODULES := horizonator$(PY_EXT_SUFFIX)
all: horizonator$(PY_EXT_SUFFIX)
include $(MRBUILD_MK)/Makefile.common.footer