source: trunk/packages/vizservers/geovis/Makefile.in @ 4364

Last change on this file since 4364 was 4364, checked in by ldelgass, 7 years ago

Fix for exported source package build: svnversion will return "Unversioned
directory" when run on an exported source tree, but the space causes a compiler
error. Replace this string with 'unknown'. A better fix would be to capture
the svn revision at the time the tree is exported. See nanohub ticket
#265649 for a report of the problem on Mac OS X (that was with clang, but I
verified it occurs with gcc on Linux as well).

File size: 3.5 KB
Line 
1DEBUG                   = #yes
2DEBUG_WRITE_FRAME_FILE  = #yes
3TRACE                   = #yes
4USE_OFFSCREEN_RENDERING = #yes
5USE_THREADS             = yes
6USE_READ_THREAD         = #yes
7
8bindir          = @bindir@
9datadir         = @datadir@
10datarootdir     = @datarootdir@
11exec_prefix     = @exec_prefix@
12includedir      = @includedir@
13libdir          = @libdir@
14mandir          = @mandir@
15prefix          = @prefix@
16srcdir          = @srcdir@
17
18CC              = @CC@
19CXX             = @CXX@
20CFLAGS          = @CFLAGS@
21CXXFLAGS        = @CXXFLAGS@
22
23VPATH           = $(srcdir)
24
25INSTALL         = @INSTALL@
26INSTALL_PROGRAM = ${INSTALL} -m 0755
27INSTALL_DATA    = ${INSTALL} -m 0644
28INSTALL_SCRIPT  = ${INSTALL} -m 0644
29MKDIR_P         = @MKDIR_P@
30
31SVN_VERSION     = $(shell svnversion $(srcdir) | sed 's/Unversioned directory/unknown/')
32STATSDIR        = @STATSDIR@
33
34GL_LIB_SPEC     = -lGL -lm
35PTHREAD_LIB_SPEC= -lpthread
36
37TCL_LIB_SPEC    = @TCL_LIB_SPEC@
38TCL_INC_SPEC    = @TCL_INC_SPEC@
39
40OSG_LIB_DIR     = @OSG_LIB_DIR@
41OSG_INC_SPEC    = @OSG_INC_SPEC@
42OSG_LIB_SPEC    = -L${OSG_LIB_DIR} \
43                -losgDB \
44                -losgViewer \
45                -losgGA \
46                -losg \
47                -lOpenThreads
48
49OSGEARTH_LIB_DIR  = $(OSG_LIB_DIR)
50OSGEARTH_INC_SPEC = $(OSG_INC_SPEC)
51OSGEARTH_LIB_SPEC = -L${OSG_LIB_DIR} \
52                  -losgEarthFeatures \
53                  -losgEarthAnnotation \
54                  -losgEarthSymbology \
55                  -losgEarthUtil \
56                  -losgEarth
57
58LD_RUN_PATH     = $(OSG_LIB_DIR):$(libdir)
59
60LIBS            = \
61                $(OSGEARTH_LIB_SPEC) \
62                $(OSG_LIB_SPEC) \
63                $(TCL_LIB_SPEC) \
64                $(GL_LIB_SPEC) \
65                $(PTHREAD_LIB_SPEC) \
66                -Wl,-rpath,$(LD_RUN_PATH) \
67                -Wl,--enable-new-dtags
68
69INCLUDES        = \
70                -I$(srcdir) \
71                $(OSGEARTH_INC_SPEC) \
72                $(OSG_INC_SPEC) \
73                $(TCL_INC_SPEC)
74
75EXTRA_CXXFLAGS  = -Wall
76EXTRA_CFLAGS    = -Wall
77DEFINES         = -DSVN_VERSION=\"$(SVN_VERSION)\" -DSTATSDIR=\"$(STATSDIR)\"
78ifdef DEBUG
79DEFINES         += -DDEBUG
80CXXFLAGS        = -O0 -g
81endif
82ifdef DEBUG_WRITE_FRAME_FILE
83DEFINES         += -DDEBUG_WRITE_FRAME_FILE
84endif
85ifdef TRACE
86DEFINES         += -DWANT_TRACE
87endif
88ifdef USE_OFFSCREEN_RENDERING
89DEFINES         += -DUSE_OFFSCREEN_RENDERING
90endif
91ifdef USE_THREADS
92DEFINES         += -DUSE_THREADS
93endif
94ifdef USE_READ_THREAD
95DEFINES         += -DUSE_READ_THREAD
96endif
97
98CXX_SWITCHES    = $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCLUDES)
99CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES)
100
101SERVER_SRCS     = \
102                CmdProc.cpp \
103                PPMWriter.cpp \
104                ReadBuffer.cpp \
105                Renderer.cpp \
106                RendererCmd.cpp \
107                RenderServer.cpp \
108                TGAWriter.cpp \
109                Trace.cpp \
110                ScaleBar.cpp \
111                SingleWindow.cpp \
112                Stats.cpp
113
114ifdef USE_THREADS
115SERVER_SRCS+= \
116        ResponseQueue.cpp
117ifdef USE_READ_THREAD
118SERVER_SRCS+= \
119        CommandQueue.cpp
120endif
121endif
122
123SERVER_OBJS=$(SERVER_SRCS:.cpp=.o)
124SERVER_OBJS+= md5.o
125SERVER=geovis
126
127.PHONY: all docs install clean clean-docs distclean
128
129all: $(SERVER)
130
131docs:
132        $(MKDIR_P) -m 0755 docs/doxygen
133        doxygen
134
135$(SERVER): $(SERVER_OBJS)
136        $(CXX) -o $@ $(SERVER_OBJS) $(LIBS)
137
138install: all
139        $(INSTALL_PROGRAM) $(SERVER) $(bindir)
140
141%.o: %.cpp
142        $(CXX) $(CXX_SWITCHES) -c $< -o $@
143
144%.o: %.c
145        $(CC) $(CC_SWITCHES) -c $< -o $@
146
147clean:
148        $(RM) *~ *.o $(SERVER)
149
150clean-docs:
151        $(RM) -r docs
152
153distclean: clean clean-docs
154        $(RM) Makefile Doxyfile
155
156CmdProc.o: CmdProc.h
157CommandQueue.o: CommandQueue.h Trace.h
158md5.o: md5.h
159PPMWriter.o: PPMWriter.h ResponseQueue.h Trace.h
160ReadBuffer.o: ReadBuffer.h Trace.h
161Renderer.o: Renderer.h Trace.h MouseCoordsTool.h ScaleBar.h
162RendererCmd.o: Renderer.h ReadBuffer.h ResponseQueue.h Trace.h CmdProc.h PPMWriter.h TGAWriter.h
163RenderServer.o: RenderServer.h RendererCmd.h Renderer.h ReadBuffer.h ResponseQueue.h Trace.h PPMWriter.h TGAWriter.h Stats.h
164ResponseQueue.o: ResponseQueue.h Trace.h
165ScaleBar.o: ScaleBar.h Trace.h
166Stats.o: Stats.h RenderServer.h Trace.h md5.h
167Trace.o: Trace.h
Note: See TracBrowser for help on using the repository browser.