forked from gabrielcuvillier/regal-emscripten-fixes
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.alphatorus
68 lines (49 loc) · 1.92 KB
/
Makefile.alphatorus
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
ifndef MAKEFILE_ALPHATORUS_INCLUDED
MAKEFILE_ALPHATORUS_INCLUDED := 1
.PHONY: alphatorus.bin alphatorus.clean
include build/common.inc
# Not supported for NaCL or emscripten - Revisit
ifeq ($(filter nacl% emscripten%,$(SYSTEM)),)
#
# alphatorus
#
include Makefile.regal
include Makefile.glut
ifndef REGAL.STATIC
$(error alphatorus needs Regal.)
endif
all:: alphatorus.bin
clean:: alphatorus.clean
alphatorus.bin: bin/$(SYSTEM)/alphatorus
alphatorus.clean:
$(RM) -r tmp/$(SYSTEM)/alphatorus/static
$(RM) -r bin/$(SYSTEM)/alphatorus
ALPHATORUS.SRCS += examples/alphatorus/src/render.cpp
ALPHATORUS.SRCS += examples/alphatorus/glut/code/main.cpp
ALPHATORUS.SRCS.NAMES := $(notdir $(ALPHATORUS.SRCS))
ALPHATORUS.OBJS := $(addprefix tmp/$(SYSTEM)/alphatorus/static/,$(ALPHATORUS.SRCS.NAMES))
ALPHATORUS.OBJS := $(ALPHATORUS.OBJS:.cpp=.o)
ALPHATORUS.DEPS := $(ALPHATORUS.DEPS:.o=.d)
ALPHATORUS.CFLAGS := -Iinclude -Iexamples/alphatorus/src
ALPHATORUS.LIBS += -Llib/$(SYSTEM) $(LDFLAGS.GLUT) $(LDFLAGS.GLU) $(LDFLAGS.X11)
ALPHATORUS.LIBS += -lm -pthread
-include $(ALPHATORUS.DEPS)
tmp/$(SYSTEM)/alphatorus/static/%.o: examples/alphatorus/src/%.cpp
@mkdir -p $(dir $@)
$(LOG_CXX)$(CCACHE) $(CXX) $(ALPHATORUS.CFLAGS) $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
tmp/$(SYSTEM)/alphatorus/static/%.o: examples/alphatorus/glut/code/%.cpp
@mkdir -p $(dir $@)
$(LOG_CXX)$(CCACHE) $(CXX) $(ALPHATORUS.CFLAGS) $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
ALPHATORUS.DEPEND :=
ALPHATORUS.DEPEND += lib/$(SYSTEM)/$(REGAL.SHARED)
ifdef GLUT.SHARED
bin/$(SYSTEM)/alphatorus: lib/$(SYSTEM)/$(GLUT.SHARED) lib/$(SYSTEM)/$(GLU.SHARED)
endif
bin/$(SYSTEM)/alphatorus: $(ALPHATORUS.OBJS) lib/$(SYSTEM)/$(REGAL.SHARED)
@mkdir -p $(dir $@)
$(LOG_LD)$(CCACHE) $(LD) $(LDFLAGS.EXTRA) -o $@ $(ALPHATORUS.OBJS) lib/$(SYSTEM)/$(REGAL.SHARED) $(ALPHATORUS.LIBS) $(REGAL.LDFLAGS)
ifneq ($(STRIP),)
$(LOG_STRIP)$(STRIP) -x $@
endif
endif
endif