commit b801b9275cb93f2cea1dce231f01780bed9834ca Author: FlorianPalm Date: Wed Dec 10 10:21:44 2014 +0100 changes for WAGO 750-860 diff --git a/CMakeLists.txt b/CMakeLists.txt index 87489b3..76c4aa0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,18 +41,16 @@ set(lib_sources src/ua_types.c # compiler flags if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") -add_definitions(-std=c99 -pedantic -pipe -Wall -Wextra -Werror -Wformat - -Wno-unused-parameter -Wno-unused-function -Wno-unused-label -Wpointer-arith -Wreturn-type -Wsign-compare -Wmultichar - -Winit-self -Wuninitialized -Wno-deprecated -Wformat-security -ffunction-sections -fdata-sections) +add_definitions(-std=c99 -fomit-frame-pointer -pipe -msoft-float -fno-builtin -DEMBED -fno-strict-aliasing) if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") add_definitions(-Wformat-nonliteral) - set (CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,--gc-sections") - set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections") + set (CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,-elf2flt -msoft-float") + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-elf2flt -msoft-float") else() add_definitions(-Wno-gnu-statement-expression) endif() if(NOT WIN32) - add_definitions(-fstack-protector -fPIC -fvisibility=hidden) + # add_definitions(-fPIC) endif() endif() @@ -115,10 +113,10 @@ else() endif() add_library(open62541-objects OBJECT ${lib_sources}) # static version that exports all symbols -add_library(open62541 SHARED $) -target_compile_definitions(open62541 INTERFACE - $<$,SHARED_LIBRARY>:UA_DYNAMIC_LINKING> # the UA_EXPORT macro is different when building the lib or using the lib -) +add_library(open62541 $) +#target_compile_definitions(open62541 INTERFACE +# $<$,SHARED_LIBRARY>:UA_DYNAMIC_LINKING> # the UA_EXPORT macro is different when building the lib or using the lib +#) ## logging set(UA_LOGLEVEL 400 CACHE STRING "Level at which logs shall be reported") @@ -137,7 +135,7 @@ endif() configure_file("src/ua_config.h.in" "${PROJECT_BINARY_DIR}/src_generated/ua_config.h") # download queue.h if required -if(WIN32) +#if(WIN32) if(NOT EXISTS "${PROJECT_BINARY_DIR}/src_generated/queue.h") file(DOWNLOAD "http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/~checkout~/src/sys/sys/queue.h" "${PROJECT_BINARY_DIR}/src_generated/queue.h" STATUS result) list(GET result 0 download_ok) @@ -146,7 +144,7 @@ if(WIN32) message(FATAL_ERROR "queue.h could not be downloaded") endif() endif() -endif(WIN32) +#endif(WIN32) # generate code from xml definitions file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/src_generated")