-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
105 lines (72 loc) · 3.88 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#OS architecture. x86 or x64
ARCH = x64
#g++ compiler version. 4.1 to 4.8
#COMPILER = 4.8
#COMPILER = 5.2
COMPILER = 4.4
#LINUX or WINDOWS
OS = LINUX
OBJSHARE = lat.o
OBJCLI = Client.o FitsTool.o menu.o
OBJSERV = Server.o Camera.o CommControl.o IOControl.o LatI.o Motor.o Sockets.o CameraErrorCodes.o
DEP = lat.h
DEPCLI = FitsTool.h menu.h lat.h
DEPSERV = Camera.h CommControl.h IOControl.h LatI.h Motor.h Sockets.h CameraErrorCodes.h
CXXFLAGS = -Wall -fexceptions -g -Ishare
CXXFLAGSCLI = -ILATClient/inc -Icfits
CXXFLAGSSERV = -ILATServer/inc -ILATServer/lib/inc-pc -D_$(OS) -D_$(ARCH)
LDLIBS = -lIce -lIceUtil -lpthread -lrt
LDLIBSCLI = -lcfitsio
LDLIBSSERV = -lPvAPI
LDFLAGS =
LDFLAGSCLI =
LDFLAGSSERV = -LLATServer/lib/lib-pc/$(ARCH)/$(COMPILER)
SRCDIR = share/src
SRCDIRCLI = LATClient/src
SRCDIRSERV = LATServer/src
ODIR = share/obj
ODIRCLI = LATClient/obj
ODIRSERV = LATServer/obj
DIRSHARE = share
DIRCLI = LATClient
DIRSERV = LATServer
VPATH = share:LATServer/obj:LATServer/src:LATServer/inc:LATClient/obj:LATClient/src:LATClient/inc:share
all: LATServer LATClient
LATServer : $(OBJSERV) $(OBJSHARE)
$(CXX) -o LATServer/bin/LATServer LATServer/obj/Server.o LATServer/obj/Sockets.o LATServer/obj/Motor.o LATServer/obj/LatI.o LATServer/obj/IOControl.o LATServer/obj/CameraErrorCodes.o LATServer/obj/CommControl.o LATServer/obj/Camera.o share/obj/lat.o $(LDFLAGSSERV) $(LDFLAGS) $(LDLIBSSERV) $(LDLIBS)
LATClient : $(OBJCLI) $(OBJSHARE)
$(CXX) -o LATClient/bin/LATClient share/obj/lat.o LATClient/obj/Client.o LATClient/obj/FitsTool.o LATClient/obj/menu.o $(LDFLAGSCLI) $(LDFLAGS) $(LDLIBSCLI) $(LDLIBS)
Server.o : Server.cpp LatI.h lat.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/Server.cpp -o LATServer/obj/Server.o
CameraErrorCodes.o: CameraErrorCodes.cpp CameraErrorCodes.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/CameraErrorCodes.cpp -o LATServer/obj/CameraErrorCodes.o
Camera.o : LATServer/src/Camera.cpp Camera.h DeviceException.h CameraErrorCodes.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/Camera.cpp -o LATServer/obj/Camera.o
CommControl.o : CommControl.cpp CommControl.h DeviceException.h Sockets.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/CommControl.cpp -o LATServer/obj/CommControl.o
IOControl.o : IOControl.cpp IOControl.h CommControl.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/IOControl.cpp -o LATServer/obj/IOControl.o
LatI.o : LatI.cpp LatI.h DeviceException.h lat.h Motor.h IOControl.h CommControl.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/LatI.cpp -o LATServer/obj/LatI.o
Motor.o : Motor.cpp Motor.h CommControl.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/Motor.cpp -o LATServer/obj/Motor.o
Sockets.o : Sockets.cpp Sockets.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSSERV) -c LATServer/src/Sockets.cpp -o LATServer/obj/Sockets.o
menu.o : menu.cpp menu.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSCLI) -c LATClient/src/menu.cpp -o LATClient/obj/menu.o
FitsTool.o : FitsTool.cpp FitsTool.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSCLI) -c LATClient/src/FitsTool.cpp -o LATClient/obj/FitsTool.o
Client.o : Client.cpp lat.h FitsTool.h menu.h
$(CXX) $(CXXFLAGS) $(CXXFLAGSCLI) -c LATClient/src/Client.cpp -o LATClient/obj/Client.o
PvApi.a PvApi.h :
$wget https://cdn.alliedvision.com/fileadmin/content/software/software/PvAPI/PvAPI_1.28_Linux.tgz
$tar xf PvAPI_1.28_Linux.tgz
$mv inc-pc/PvApi.h
$mv lib-pc/* LATServer/lib
lat.o : lat.cpp lat.h
$(CXX) $(CXXFLAGS) -Ishare -c share/lat.cpp -o share/obj/lat.o
lat.cpp lat.h : lat.ice
slice2cpp share/lat.ice --output-dir share
.PHONY: clean
clean :
-rm LATClient/bin/LATClient LATServer/bin/LATServer share/lat.h share/lat.cpp share/obj/lat.o LATClient/obj/Client.o LATClient/obj/FitsTool.o LATClient/obj/menu.o LATServer/obj/Server.o LATServer/obj/Camera.o LATServer/obj/CommControl.o LATServer/obj/IOControl.o LATServer/obj/LatI.o LATServer/obj/Motor.o LATServer/obj/Sockets.o LATServer/obj/CameraErrorCodes.o