-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
73 lines (58 loc) · 1.72 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
# Pattern matching in make files
# $^ matches all the input dependencies
# $< matches the first input dependency
# $@ matches the output
CC=g++
GCC_VERSION_GE_43 := $(shell expr `g++ -dumpversion | cut -f2 -d.` \>= 3)
PUREGEV_ROOT = /opt/pleora/ebus_sdk
OPENCVDIR = /usr/include/opencv2/
CCFITSDIR = /usr/include/CCfits/
INCLUDE = -I$(OPENCVDIR) -I$(PUREGEV_ROOT)/include/ -I$(CCFITSDIR)
CFLAGS = -Wall $(INCLUDE) -Wno-unknown-pragmas
ifeq "$(GCC_VERSION_GE_43)" "1"
CFLAGS += -std=gnu++0x
endif
IMPERX =-L$(PUREGEV_ROOT)/lib/ \
-lPvBase \
-lPvDevice \
-lPvBuffer \
-lPvPersistence \
-lPvGenICam \
-lPvStreamRaw \
-lPvStream
THREAD = -lpthread
CCFITS = -lCCfits
X11 = -lX11
GL = -lGL
GLU = -lGLU
GLUT = -lglut
ifeq "$(GCC_VERSION_GE_43)" "1"
CCFITS += -lrt
endif
EXEC_CORE = display
EXEC_ALL = $(EXEC_CORE) sbc_temp
default: $(EXEC_CORE)
all: $(EXEC_ALL)
snap: snap.cpp ImperxStream.o compression.o
$(CC) $(CFLAGS) $^ -o $@ $(IMPERX)
sbc_temp: sbc_temp.cpp
$(CC) $(CFLAGS) $^ -o $@
stream: stream.cpp
$(CC) $(CFLAGS) $^ -o $@ $(IMPERX)
display: display.cpp compression.o
$(CC) $(CFLAGS) $^ -o $@ $(GL) $(GLU) $(GLUT) $(THREAD) $(IMPERX) $(CCFITS)
#This pattern matching will catch all "simple" object dependencies
%.o: %.cpp %.hpp
$(CC) -c $(CFLAGS) $< -o $@
install: $(EXEC_CORE)
#sudo systemctl stop sas
#sudo systemctl stop sbc_info
#sudo systemctl stop sbc_shutdown
#sudo cp sunDemo /usr/local/bin/sas.runtime
#sudo cp sbc_info /usr/local/bin/sbc_info.runtime
#sudo cp sbc_shutdown /usr/local/bin/sbc_shutdown.runtime
#sudo systemctl start sbc_shutdown
#sudo systemctl start sbc_info
#sudo systemctl start sas
clean:
rm -rf *.o *.out $(EXEC_ALL)