Newer
Older
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#=============================================================================
#
# file : Makefile
#
# description : Include for the Keithley428 class.
#
# project : Makefile to generate a Tango server
#
# $Author: $
#
# $Revision: $
#
#
# copyleft : European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
#
#=============================================================================
# This file is generated by POGO
# (Program Obviously used to Generate tango Object)
#
# (c) - Software Engineering Group - ESRF
#=============================================================================
#
CLASS = Keithley428
MAJOR_VERS = 1
MINOR_VERS = 1
RELEASE = Release_$(MAJOR_VERS)_$(MINOR_VERS)
ifndef _ARCH
_ARCH = $(shell uname -m)
endif
ifeq ($(_ARCH), x86_64)
libdir=lib64
else
libdir=lib
endif
#-----------------------------------------
# Set default home directories
#-----------------------------------------
TANGO_HOME = /usr/local
ABS_CLASS =
CPP_SERVERS = $(TANGO_DIR)/Libraries/cppserver
UTIL_DIR=$(TANGO_DIR)/Libraries/util/trunk
ifdef no_debug
DEBUG = -O
else
DEBUG = -g
endif
#
# if 'make using_trunk=1' use the trunk directories
#
ifdef using_trunk
CTRL_DIR = $(TANGO_DIR)/DeviceClasses/Communication/GpibDeviceServer/trunk
else
CTRL_DIR = $(shell find $(TANGO_DIR)/DeviceClasses/Communication/GpibDeviceServer/tags -type d -regex '.*Release_[0-9]*_[0-9]*' | sort -t '_' -k2 -k3 -nr | head -1)
endif
INCLUDE_DIRS = -I$(TANGO_HOME)/include/tango \
-I/usr/local/include \
-I. \
-I$(CTRL_DIR) \
-I$(CPP_SERVERS)/include
OBJS_DIR = obj
LIB_DIRS = -L $(TANGO_HOME)/$(libdir) \
-L /usr/local/$(libdir) \
-L $(CPP_SERVERS)/$(libdir)
#-----------------------------------------
# Set CXXFLAGS and LFLAGS
#-----------------------------------------
CXXFLAGS = $(DEBUG) -D_REENTRANT $(INCLUDE_DIRS)
LFLAGS = $(DEBUG) $(LIB_DIRS) \
-ltango \
-llog4tango \
-lomniORB4 \
-lomniDynamic4 \
-lomnithread \
-lCOS4 \
-lGpibDeviceServer \
/usr/local/$(libdir)/libgpib.a \
-ldl -lpthread
#-----------------------------------------
# Set dependences
#-----------------------------------------
SVC_OBJS = $(OBJS_DIR)/main.o \
$(OBJS_DIR)/ClassFactory.o \
$(OBJS_DIR)/$(CLASS)Class.o \
$(OBJS_DIR)/$(CLASS)StateMachine.o \
$(OBJS_DIR)/$(CLASS).o
SVC_INC = $(CLASS)Class.h \
$(CLASS).h
$(OBJS_DIR)/%.o: %.cpp $(SVC_INC)
$(CXX) $(CXXFLAGS) -c $< -o $(OBJS_DIR)/$*.o
#-----------------------------------------
# Make Entry
#-----------------------------------------
all: other_classes $(CLASS)
other_classes:
@echo -e "\n >>> Making $(CPP_SERVERS)/$(libdir)/libGpibDeviceServer.a \n"
cd $(CTRL_DIR) && make linux=1 lib
$(CLASS): make_obj_dir make_bin_dir $(SVC_OBJS)
$(CXX) $(SVC_OBJS) -o $(CLASS) $(LFLAGS)
@mv $(CLASS) bin/$(CLASS)
clean:
rm -f $(OBJS_DIR)/*.o \
$(OBJS_DIR)/*.so.o \
bin/$(CLASS) \
core
make_obj_dir:
@mkdir -p obj
make_bin_dir:
@mkdir -p bin
#-----------------------------------------
# Install binary file
#-----------------------------------------
install:
cp bin/$(CLASS) $(DESTDIR)
#----------------------------------------------------
# Tag the SVN module corresponding to this class
#----------------------------------------------------
tag:
ifeq ($(shell ls -d ../tags/$(RELEASE) 2>/dev/null ), ../tags/$(RELEASE))
@echo $(RELEASE) exists, specify new version numbers
else
svn copy ../trunk ../tags/$(RELEASE)
svn commit ../tags/$(RELEASE) \
-m "Tagging the $(RELEASE) of the $(CLASS) project."
endif
show_tag:
@cvstag -d