forked from shwhalen/mycelia
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
85 lines (67 loc) · 2.29 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
80
81
82
83
84
85
VRUI_MAKEDIR =$(HOME)/usr/share/Vrui-2.3-003
include $(VRUI_MAKEDIR)/Vrui.makeinclude
INSTALLDIR = /usr/local
ifeq ($(INSTALLDIR), /)
BININSTALLDIR = /usr/bin
SHAREINSTALLDIR = /usr/share/mycelia
else
BININSTALLDIR = $(INSTALLDIR)/bin
SHAREINSTALLDIR = $(INSTALLDIR)/share/mycelia
endif
FONTINSTALLDIR = $(SHAREINSTALLDIR)/fonts
DATAINSTALLDIR = $(SHAREINSTALLDIR)/data
BASEDIR = /usr
CC = $(BASEDIR)/bin/g++
CFLAGS = -I $(BASEDIR)/include -I $(shell pwd)/src -Wno-deprecated -Wall -g -O2
LINKFLAGS = -L$(BASEDIR)/lib -lGLU
VPATH = src:src/generators:src/layout:src/parsers:src/tools:src/windows
OBJS = barabasigenerator.o erdosgenerator.o wattsgenerator.o \
arflayout.o arfwindow.o edgebundler.o frlayout.o \
chacoparser.o dotparser.o gmlparser.o xmlparser.o \
graphbuilder.o nodeselector.o \
attributewindow.o imagewindow.o \
graph.o mycelia.o vruihelp.o rpcserver.o
# boost
CFLAGS += -I $(BASEDIR)/include/boost
LINKFLAGS += -lboost_system-mt -lboost_regex-mt
# ftgl font renderer
CFLAGS += -I $(BASEDIR)/include/freetype2
LINKFLAGS += -lftgl -lfreetype
# rpc server
CFLAGS += -D__RPCSERVER__
LINKFLAGS += -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss \
-lxmlrpc_client++ -lxmlrpc_client -lxmlrpc++ -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok -lcurl
# nvidia cuda sdk
#CUDA_TOOLKIT_DIR = /usr/local/cuda
#CUDA_SDK_DIR = "/Developer/GPU Computing/C/common/inc"
#ifneq ($(wildcard $(CUDA_TOOLKIT_DIR)),)
# NVCC = $(CUDA_TOOLKIT_DIR)/bin/nvcc
# NVCC_CFLAGS = -I $(CUDA_SDK_DIR) -O2
# CFLAGS += -I $(CUDA_TOOLKIT_DIR)/include -D__CUDA__
# LINKFLAGS += -L$(CUDA_TOOLKIT_DIR)/lib -lcuda -lcudart
# OBJS += gpulayout.o
#endif
.SUFFIXES: .cpp .cu .o
.cpp.o:
@echo Compiling $<...
@$(CC) $(VRUI_CFLAGS) $(CFLAGS) -c $<
.cu.o:
@echo Compiling $<...
@$(NVCC) $(NVCC_CFLAGS) -c $<
mycelia.o: CFLAGS += -DRESOURCEDIR='"$(SHAREINSTALLDIR)"'
all: mycelia
mycelia: $(OBJS)
@$(CC) $+ -o $@ $(VRUI_LINKFLAGS) $(LINKFLAGS)
pch: src/precompiled.hpp
@$(CC) -x c++-header $(VRUI_CFLAGS) $(CFLAGS) $<
install: all
@echo Installing mycelia...
@mkdir -p $(BININSTALLDIR)
@mkdir -p $(FONTINSTALLDIR)
@mkdir -p $(DATAINSTALLDIR)
@cp mycelia $(BININSTALLDIR)
@cp fonts/* $(FONTINSTALLDIR)
@cp data/* $(DATAINSTALLDIR)
clean:
rm -f $(OBJS)
rm -f src/precompiled.hpp.gch