forked from Wied58/NiteLite_115
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·48 lines (36 loc) · 1.2 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
# Makefile for Basler pylon sample program
.PHONY: all clean
# The program to build
NAME := NiteLite_115
MULTI := NiteLite_115_multi
BASLERCTRL := baslerctrl
BASLERTEST := baslertest
LSBASLER := lsbaslers
HANDLEUSB := handleusb
OBCDATATEST := OBCDataTest
# Installation directories for pylon
PYLON_ROOT ?= /opt/pylon5
# Build tools and flags
LD := $(CXX)
CPPFLAGS := $(shell $(PYLON_ROOT)/bin/pylon-config --cflags) -std=c++11
CXXFLAGS := #e.g., CXXFLAGS=-g -O0 for debugging
LDFLAGS := $(shell $(PYLON_ROOT)/bin/pylon-config --libs-rpath)
LDLIBS := $(shell $(PYLON_ROOT)/bin/pylon-config --libs) -lpthread
# Rules for building
all: $(NAME) $(MULTI) $(BASLERCTRL) $(LSBASLER) $(HANDLEUSB) $(OBCDATATEST)
$(NAME): $(NAME).o
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
$(MULTI): $(MULTI).o
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
$(BASLERCTRL): $(BASLERCTRL).o OBCData.o
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
$(LSBASLER): $(LSBASLER).o
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
$(HANDLEUSB): $(HANDLEUSB).o
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
$(OBCDATATEST): $(OBCDATATEST).o OBCData.o
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
.cpp.o:
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
clean:
$(RM) $(NAME).o $(NAME)