initial verion
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
# Makefile for Basler pylon sample program
|
||||
.PHONY: all clean
|
||||
|
||||
# The program to build
|
||||
NAME := minimal_pylon
|
||||
|
||||
# Installation directories for pylon
|
||||
PYLON_ROOT ?= /opt/pylon
|
||||
|
||||
# Build tools and flags
|
||||
LD := $(CXX)
|
||||
CPPFLAGS := $(shell $(PYLON_ROOT)/bin/pylon-config --cflags)
|
||||
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)
|
||||
|
||||
# Rules for building
|
||||
all: $(NAME)
|
||||
|
||||
$(NAME): $(NAME).o
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
||||
$(NAME).o: $(NAME).cpp
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) $(NAME).o $(NAME)
|
||||
Reference in New Issue
Block a user