-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.arm
74 lines (58 loc) · 2.35 KB
/
Makefile.arm
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
#EPICS_BASE = /cs/certified/apps/epics/v3.13.10-j1
EPICS_BASE = /gluex/controls/epics/R3-14-12-3-1/base
#EPICS_BUILD = rhel-6-x86_64
EPICS_BUILD = linux-x86_64
BIN = bin.armv7l
LIB = lib.armv7l
EXES = $(BIN)/sendpack $(BIN)/setVbias $(BIN)/resetVbias $(BIN)/probeVbias $(BIN)/readVbias \
$(BIN)/TAGMremotectrl
OBJS = TAGMcommunicator.o TAGMcontroller.o sendpack.o setVbias.o resetVbias.o \
probeVbias.o readVbias.o
#LIBS = /usr/lib64/libpcap.so.1
LIBS = /usr/lib/arm-linux-gnueabihf/libpcap.so
CFLAGS = -g -I. -I./include -O0 -Wno-psabi
# comment out this section if epics is not available on the build host
#EPICS_CFLAGS = -DUPDATE_STATUS_IN_EPICS=1 \
# -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \
# -L$(EPICS_BASE)/lib/$(EPICS_BUILD) -lca \
# -Wl,-rpath,$(EPICS_BASE)/lib/$(EPICS_BUILD)
# replace "ssh" with "true" below if root access is not available on the build host
SSH := true
all: $(EXES)
$(BIN)/setVbias: setVbias.cc TAGMcontroller.cc TAGMcommunicator.cc
mkdir -p $(BIN)
${CXX} ${CFLAGS} ${EPICS_CFLAGS} -o $@ $^ ${LIBS}
$(SSH) root@gryphn chown root `pwd`/$@
$(SSH) root@gryphn chmod u+s `pwd`/$@
$(BIN)/resetVbias: resetVbias.cc TAGMcontroller.cc TAGMcommunicator.cc
mkdir -p $(BIN)
${CXX} ${CFLAGS} ${EPICS_CFLAGS} -o $@ $^ ${LIBS}
$(SSH) root@gryphn chown root `pwd`/$@
$(SSH) root@gryphn chmod u+s `pwd`/$@
$(BIN)/probeVbias: probeVbias.cc TAGMcontroller.cc TAGMcommunicator.cc
mkdir -p $(BIN)
${CXX} ${CFLAGS} -o $@ $^ ${LIBS}
$(SSH) root@gryphn chown root `pwd`/$@
$(SSH) root@gryphn chmod u+s `pwd`/$@
$(BIN)/readVbias: readVbias.cc TAGMcontroller.cc TAGMcommunicator.cc
mkdir -p $(BIN)
${CXX} ${CFLAGS} -o $@ $^ ${LIBS}
$(SSH) root@gryphn chown root `pwd`/$@
$(SSH) root@gryphn chmod u+s `pwd`/$@
$(BIN)/sendpack: sendpack.c
mkdir -p $(BIN)
${CXX} ${CFLAGS} -o $@ $^ ${LIBS}
$(SSH) root@gryphn chown root `pwd`/$@
$(SSH) root@gryphn chmod u+s `pwd`/$@
$(BIN)/TAGMremotectrl: TAGMremotectrl.cc TAGMcontroller.cc TAGMcommunicator.cc
mkdir -p $(BIN)
${CXX} ${CFLAGS} -o $@ $^ ${LIBS}
$(SSH) root@gryphn chown root `pwd`/$@
$(SSH) root@gryphn chmod u+s `pwd`/$@
$(LIB)/epics.so: pyepics.cc
mkdir -p $(LIB)
${CXX} -fPIC -shared ${CFLAGS} ${EPICS_CFLAGS} -o $@ $^ ${LIBS}
clean:
rm -f ${OBJS} ${EXES}
TAGMcontroller.cc: TAGMcontroller.h
TAGMcommunicator.cc: TAGMcommunicator.h