1 | # for cross compilation with mingw export the path to your cross compiler: |
---|
2 | # export CROSS_GPP=/usr/x86_64-pc-linux-gnu/i686-mingw32/gcc-bin/4.3.2/i686-mingw32-g++ |
---|
3 | |
---|
4 | # RTS2 only: |
---|
5 | # TelescopeServerRTS2 TelescopeServerRTS2.exe are not included in the all,exe |
---|
6 | # targets because they require an external lib. |
---|
7 | # You can build them like this: |
---|
8 | #make TelescopeServerRTS2 |
---|
9 | # You will need to provide path for xmlrpc++ library from RTS2 distribution. Please get it with: |
---|
10 | # svn co https://rts-2.svn.sourceforge.net/svnroot/rts-2/trunk/rts-2/src/xmlrpc/xmlrpc++ |
---|
11 | #export XMLRPCPP=/pathtoxmlrpclib++_from_rts2 |
---|
12 | |
---|
13 | |
---|
14 | TelescopeServerBAO_CPP = Connection.cpp Listener.cpp Socket.cpp socket.cpp filetools.cpp exception.c astro.cpp ClientSocket.cpp \ |
---|
15 | Server.cpp ServerBAO.cpp LogFile.cpp MainBAO.cpp |
---|
16 | |
---|
17 | TelescopeServerBAO_O = $(TelescopeServerBAO_CPP:.cpp=.o) |
---|
18 | TelescopeServerBAO_OBJ = $(TelescopeServerBAO_CPP:.cpp=.obj) |
---|
19 | |
---|
20 | |
---|
21 | CCFLAGS = -O4 -Wall -Wextra -Wno-unused-parameter -Werror -DDEBUG3 -DDEBUG4 -DDEBUG5 -lX11 |
---|
22 | LDFLAGS = -O4 -s -lX11 |
---|
23 | |
---|
24 | ifneq ($(XMLRPCPP),) |
---|
25 | CCFLAGS += -I$(XMLRPCPP) |
---|
26 | endif |
---|
27 | |
---|
28 | |
---|
29 | .SUFFIXES: .cpp .o .obj |
---|
30 | |
---|
31 | .cpp.o: |
---|
32 | g++ $(CCFLAGS) $< -c -o $@ |
---|
33 | |
---|
34 | .cpp.obj: |
---|
35 | $(CROSS_GPP) $(CCFLAGS) $< -c -o $@ |
---|
36 | |
---|
37 | all: TelescopeServerBAO |
---|
38 | |
---|
39 | |
---|
40 | install: TelescopeServerBAO |
---|
41 | install -d ~/.stellarium/servers |
---|
42 | install TelescopeServerBAO ~/.stellarium/servers |
---|
43 | |
---|
44 | |
---|
45 | TelescopeServerBAO: $(TelescopeServerBAO_O) |
---|
46 | g++ $(LDFLAGS) $(TelescopeServerBAO_O) -o $@ |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | depend: |
---|
51 | makedepend -Y -- $(CCFLAGS) -- -f- >make.dep 2>/dev/null \ |
---|
52 | $(TelescopeServerBAO_CPP) \ |
---|
53 | sed -e 's/\.o/\.obj/g' make.dep > make.cross_dep |
---|
54 | |
---|
55 | clean: |
---|
56 | rm *.o TelescopeServerBAO |
---|
57 | |
---|
58 | make.dep: |
---|
59 | touch make.dep |
---|
60 | |
---|
61 | make.cross_dep: |
---|
62 | touch make.cross_dep |
---|
63 | |
---|
64 | include make.dep |
---|
65 | include make.cross_dep |
---|