Skip to content
Permalink
Browse files

Initial Commit.

Signed-off-by: Breit <Matthew.Breit@baslerweb.com>
  • Loading branch information...
MattsProjects committed Jun 17, 2019
1 parent b8cb1ed commit fcd939068d7d30546c2223936cc680c31325002a
@@ -0,0 +1,61 @@
# Makefile for Basler pylon sample program
.PHONY: makeoutdir all movetooutdir cleano cleanup clean

# The program to build
NAME := PylonSample_Stereo_Acquisition

# We will make an output directory to hold the final builds
MKDIR_P := mkdir -p
OUT_DIR := ./bin_linux

# Installation directories for pylon
PYLON_ROOT := /opt/pylon5

# Additional libraries, etc.
OPENCV_LIB := $(shell pkg-config --libs opencv)
OPENCV_INC := /usr/include/opencv2

# Build tools and flags
SRC_DIR := ./source
INC_DIR := ./include
OBJ_DIR := $(OUT_DIR)
SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp)
OBJ_FILES := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC_FILES))
LD := $(CXX)
CPPFLAGS := $(shell $(PYLON_ROOT)/bin/pylon-config --cflags) -std=c++11 -I$(INC_DIR) -I$(OPENCV_INC)
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) $(OPENCV_LIB)

# Rules for building: make output directory, make program, move to output directory
all: makeoutdir cleano $(NAME) movetooutdir cleanup

makeoutdir:
${MKDIR_P} $(OUT_DIR)

movetooutdir:
mv $(NAME) $(OUT_DIR)

cleano:
rm -f $(OUT_DIR)/*.o

cleanup:
rm -f $(OUT_DIR)/*.o

$(NAME): $(OBJ_FILES)
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) -lpthread

$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

#all: $(NAME)

#$(NAME): $(NAME).o
# $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) -lpthread

#$(NAME).o: $(NAME).cpp
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

clean:
# $(RM) $(NAME).o $(NAME)
rm -rf $(OUT_DIR)
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\PylonSample_Stereo_Acquisition.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\StitchImage.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>PylonSample_Stereo_Acquisition</ProjectName>
<ProjectGuid>{9CE2A9A4-2EFB-4EF7-B54D-6B44317D4B59}</ProjectGuid>
<RootNamespace>PylonSample_Stereo_Acquisition_PTP</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin_windows\</OutDir>
<IntDir>$(SolutionDir)bin_windows\_int\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)\include;$(PYLON_DEV_DIR)\include;(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(PYLON_DEV_DIR)\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

0 comments on commit fcd9390

Please sign in to comment.
You can’t perform that action at this time.