Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error creating linux installer. [5392] #529

Merged
merged 5 commits into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,25 @@ AC_C_BIGENDIAN(
AC_MSG_ERROR(universial endianess not supported)
)

# OpenSSL
AX_CHECK_OPENSSL(ac_openssl_found=yes,
ac_openssl_found=no)

AS_IF([test "$ac_openssl_found" = yes],
AC_DEFINE([TLS_FOUND], [1], [Defined if TLS support is enable]),
AC_DEFINE([TLS_FOUND], [0], [Defined if TLS support is enable]))

# Security
AC_ARG_ENABLE([security],
AS_HELP_STRING([--enable-security], [Enables security support]),
ac_enable_security=$enableval,
ac_enable_security=no
)
AS_IF([test "$ac_enable_security" = yes],
[
AC_DEFINE([HAVE_SECURITY], [1], [Defined if security support is enable])
AX_CHECK_OPENSSL([AC_MSG_NOTICE([Found OpenSSL])], [AC_MSG_ERROR([Could not find OpenSSL])])
],
[AC_DEFINE([HAVE_SECURITY], [0], [Defined if security support is enable])])
AS_IF([test "$ac_openssl_found" = yes],
AC_DEFINE([HAVE_SECURITY], [1], [Defined if security support is enable]),
AC_MSG_ERROR([To support security you need OpenSSL libraries])),
AC_DEFINE([HAVE_SECURITY], [0], [Defined if security support is enable]))
AM_CONDITIONAL(SECURITY, test $ac_enable_security = yes)

# Check for libraries used in the main build process
Expand Down
2 changes: 1 addition & 1 deletion examples/C++/ClientServerTest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/Configurability/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
15 changes: 7 additions & 8 deletions examples/C++/DeadlineQoSExample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,22 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I../../../thirdparty/asio/asio/include

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

all: $(DIRECTORIES) DeadlineQoSExample

DEADLINEQOSEXAMPLE_TARGET= bin/DeadlineQoSExample

DEADLINEQOSEXAMPLE_SRC_CXXFILES=
DEADLINEQOSEXAMPLE_SRC_CXXFILES= DeadlineQoSExample/deadlinepayload.cxx \
DeadlineQoSExample/deadlinepayloadPubSubTypes.cxx \
DeadlineQoSExample/deadlinepayloadPublisher.cxx \
DeadlineQoSExample/deadlinepayloadSubscriber.cxx \
DeadlineQoSExample/deadlinepayloadPubSubMain.cxx

DEADLINEQOSEXAMPLE_SRC_CPPFILES= DeadlineQoSExample/deadlinepayload.cxx \
DeadlineQoSExample/deadlinepayloadPubSubTypes.cxx \
DeadlineQoSExample/deadlinepayloadPublisher.cxx \
DeadlineQoSExample/deadlinepayloadSubscriber.cxx \
DeadlineQoSExample/deadlinepayloadPubSubMain.cxx \
DeadlineQoSExample/deadlineQoS.cxx

DEADLINEQOSEXAMPLE_SRC_CPPFILES=

# Project sources are copied to the current directory
DEADLINEQOSEXAMPLE_SRCS= $(DEADLINEQOSEXAMPLE_SRC_CXXFILES) $(DEADLINEQOSEXAMPLE_SRC_CPPFILES)
Expand Down
103 changes: 103 additions & 0 deletions examples/C++/DisablePositiveACKs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

CPP=g++
LN=g++
AR=ar
CP=cp
SYSLIBS= -ldl -lnsl -lm -lpthread -lrt
DEFINES=
COMMON_CFLAGS= -c -Wall -D__LITTLE_ENDIAN__ -std=c++11

## CHOOSE HERE BETWEEN 32 and 64 bit architecture

##32 BIT ARCH:
#COMMON_CFLAGS+= -m32 -fpic
#LDFLAGS=-m32

#64BIT ARCH:
COMMON_CFLAGS+= -m64 -fpic
LDFLAGS=-m64

CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I../../../thirdparty/asio/asio/include

LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

all: $(DIRECTORIES) DisablePositiveACKs

DISABLEPOSITIVEACKSEXAMPLE_TARGET= bin/DisablePositiveACKs

DISABLEPOSITIVEACKSEXAMPLE_SRC_CXXFILES= \
DisablePositiveACKs/Topic.cxx \
DisablePositiveACKs/TopicTypes.cxx

DISABLEPOSITIVEACKSEXAMPLE_SRC_CPPFILES= \
DisablePositiveACKs/DisablePositiveACKsPublisher.cpp \
DisablePositiveACKs/DisablePositiveACKsSubscriber.cpp \
DisablePositiveACKs/DisablePositiveACKS_main.cpp


# Project sources are copied to the current directory
DISABLEPOSITIVEACKSEXAMPLE_SRCS= $(DISABLEPOSITIVEACKSEXAMPLE_SRC_CXXFILES) $(DISABLEPOSITIVEACKSEXAMPLE_SRC_CPPFILES)

# Source directories
DISABLEPOSITIVEACKSEXAMPLE_SOURCES_DIRS_AUX= $(foreach srcdir, $(dir $(DISABLEPOSITIVEACKSEXAMPLE_SRCS)), $(srcdir))
DISABLEPOSITIVEACKSEXAMPLE_SOURCES_DIRS= $(shell echo $(DISABLEPOSITIVEACKSEXAMPLE_SOURCES_DIRS_AUX) | tr " " "\n" | sort | uniq | tr "\n" " ")

DISABLEPOSITIVEACKSEXAMPLE_OBJS = $(foreach obj,$(notdir $(addsuffix .o, $(DISABLEPOSITIVEACKSEXAMPLE_SRCS))), output/$(obj))
DISABLEPOSITIVEACKSEXAMPLE_DEPS = $(foreach dep,$(notdir $(addsuffix .d, $(DISABLEPOSITIVEACKSEXAMPLE_SRCS))), output/$(dep))

OBJS+= $(DISABLEPOSITIVEACKSEXAMPLE_OBJS)
DEPS+= $(DISABLEPOSITIVEACKSEXAMPLE_DEPS)

DisablePositiveACKs: $(DISABLEPOSITIVEACKSEXAMPLE_TARGET)

$(DISABLEPOSITIVEACKSEXAMPLE_TARGET): $(DISABLEPOSITIVEACKSEXAMPLE_OBJS)
$(LN) $(LDFLAGS) -o $(DISABLEPOSITIVEACKSEXAMPLE_TARGET) $(DISABLEPOSITIVEACKSEXAMPLE_OBJS) $(LIBS)

vpath %.cxx $(DISABLEPOSITIVEACKSEXAMPLE_SOURCES_DIRS)
vpath %.cpp $(DISABLEPOSITIVEACKSEXAMPLE_SOURCES_DIRS)

output/%.cxx.o:%.cxx
@echo Calculating dependencies $<
@$(CC) $(CFLAGS) -MM $(CFLAGS) $(INCLUDES) $< | sed "s/^.*:/output\/&/g" > $(@:%.cxx.o=%.cxx.d)
@echo Compiling $<
@$(CC) $(CFLAGS) $(INCLUDES) $< -o $@

output/%.cpp.o:%.cpp
@echo Calculating dependencies $<
@$(CPP) $(CFLAGS) -MM $(CFLAGS) $(INCLUDES) $< | sed "s/^.*:/output\/&/g" > $(@:%.cpp.o=%.cpp.d)
@echo Compiling $<
@$(CPP) $(CFLAGS) $(INCLUDES) $< -o $@

.PHONY: DisablePositiveACKs

clean:
@rm -f $(OBJS)
@rm -f $(DEPS)

ifneq ($(MAKECMDGOALS), clean)
-include $(DEPS)
endif

%.dir :
@echo "Checking directory $*"
@if [ ! -d $* ]; then \
echo "Making directory $*"; \
mkdir -p $* ; \
fi;
100 changes: 100 additions & 0 deletions examples/C++/DynamicHelloWorldExample/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

CPP=g++
LN=g++
AR=ar
CP=cp
SYSLIBS= -ldl -lnsl -lm -lpthread -lrt
DEFINES=
COMMON_CFLAGS= -c -Wall -D__LITTLE_ENDIAN__ -std=c++11

## CHOOSE HERE BETWEEN 32 and 64 bit architecture

##32 BIT ARCH:
#COMMON_CFLAGS+= -m32 -fpic
#LDFLAGS=-m32

#64BIT ARCH:
COMMON_CFLAGS+= -m64 -fpic
LDFLAGS=-m64

CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I../../../thirdparty/asio/asio/include

LIBS = -lfastrtps -lfastcdr $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

all: $(DIRECTORIES) DynamicHelloWorldExample

DYNAMICEXAMPLE_TARGET= bin/DynamicHelloWorldExample

DYNAMICEXAMPLE_SRC_CXXFILES=

DYNAMICEXAMPLE_SRC_CPPFILES= \
DynamicHelloWorldExample/HelloWorldPublisher.cpp \
DynamicHelloWorldExample/HelloWorldSubscriber.cpp \
DynamicHelloWorldExample/HelloWorld_main.cpp

# Project sources are copied to the current directory
DYNAMICEXAMPLE_SRCS= $(DYNAMICEXAMPLE_SRC_CXXFILES) $(DYNAMICEXAMPLE_SRC_CPPFILES)

# Source directories
DYNAMICEXAMPLE_SOURCES_DIRS_AUX= $(foreach srcdir, $(dir $(DYNAMICEXAMPLE_SRCS)), $(srcdir))
DYNAMICEXAMPLE_SOURCES_DIRS= $(shell echo $(DYNAMICEXAMPLE_SOURCES_DIRS_AUX) | tr " " "\n" | sort | uniq | tr "\n" " ")

DYNAMICEXAMPLE_OBJS = $(foreach obj,$(notdir $(addsuffix .o, $(DYNAMICEXAMPLE_SRCS))), output/$(obj))
DYNAMICEXAMPLE_DEPS = $(foreach dep,$(notdir $(addsuffix .d, $(DYNAMICEXAMPLE_SRCS))), output/$(dep))

OBJS+= $(DYNAMICEXAMPLE_OBJS)
DEPS+= $(DYNAMICEXAMPLE_DEPS)

DynamicHelloWorldExample: $(DYNAMICEXAMPLE_TARGET)

$(DYNAMICEXAMPLE_TARGET): $(DYNAMICEXAMPLE_OBJS)
$(LN) $(LDFLAGS) -o $(DYNAMICEXAMPLE_TARGET) $(DYNAMICEXAMPLE_OBJS) $(LIBS)

vpath %.cxx $(DYNAMICEXAMPLE_SOURCES_DIRS)
vpath %.cpp $(DYNAMICEXAMPLE_SOURCES_DIRS)

output/%.cxx.o:%.cxx
@echo Calculating dependencies $<
@$(CC) $(CFLAGS) -MM $(CFLAGS) $(INCLUDES) $< | sed "s/^.*:/output\/&/g" > $(@:%.cxx.o=%.cxx.d)
@echo Compiling $<
@$(CC) $(CFLAGS) $(INCLUDES) $< -o $@

output/%.cpp.o:%.cpp
@echo Calculating dependencies $<
@$(CPP) $(CFLAGS) -MM $(CFLAGS) $(INCLUDES) $< | sed "s/^.*:/output\/&/g" > $(@:%.cpp.o=%.cpp.d)
@echo Compiling $<
@$(CPP) $(CFLAGS) $(INCLUDES) $< -o $@

.PHONY: DynamicHelloWorldExample

clean:
@rm -f $(OBJS)
@rm -f $(DEPS)

ifneq ($(MAKECMDGOALS), clean)
-include $(DEPS)
endif

%.dir :
@echo "Checking directory $*"
@if [ ! -d $* ]; then \
echo "Making directory $*"; \
mkdir -p $* ; \
fi;
2 changes: 1 addition & 1 deletion examples/C++/Filtering/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/FlowControlExample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/HelloWorldExample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/HelloWorldExampleTCP/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/HistoryKind/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/Keys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/LateJoiners/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS = $(COMMON_CFLAGS) -O2

INCLUDES= -I.

LIBS = -lfastcdr -lfastrtps $(SYSLIBS)
LIBS = -lfastcdr -lfastrtps $(shell test -x "$$(which pkg-config)" && pkg-config libssl libcrypto --libs --silence-errors) $(SYSLIBS)

DIRECTORIES= output.dir bin.dir

Expand Down
Loading