Merge pull request #513 from worktycho/FreeBSDDynamicLink

Fixed FreeBSD dynamic linker library
master
Mattes D 2014-01-07 08:07:01 -08:00
commit 748fd86b83
4 changed files with 13 additions and 343 deletions

View File

@ -97,6 +97,17 @@ if (WIN32)
add_definitions(-DLUA_BUILD_AS_DLL)
endif()
#On Unix we use two dynamic loading libraries dl and ltdl.
#Preference is for dl on unknown systems as it is specified in POSIX
#the dynamic loader is used by lua and sqllite.
if (UNIX)
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
set(DYNAMIC_LOADER ltdl)
else()
set(DYNAMIC_LOADER dl)
endif()
endif()
# The Expat library is linked in statically, make the source files aware of that:
add_definitions(-DXML_STATIC)

View File

@ -26,5 +26,5 @@ else()
endif()
if (UNIX)
target_link_libraries(lua m dl)
target_link_libraries(lua m ${DYNAMIC_LOADER})
endif()

View File

@ -21,5 +21,5 @@ endif()
add_library(sqlite ${SOURCE})
if (UNIX)
target_link_libraries(sqlite dl)
target_link_libraries(sqlite ${DYNAMIC_LOADER})
endif()

View File

@ -1,341 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/tycho/MCServer
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/tycho/MCServer
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
/usr/bin/cmake -i .
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/tycho/MCServer && $(CMAKE_COMMAND) -E cmake_progress_start /home/tycho/MCServer/CMakeFiles /home/tycho/MCServer/lib/tolua++/CMakeFiles/progress.marks
cd /home/tycho/MCServer && $(MAKE) -f CMakeFiles/Makefile2 lib/tolua++/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/tycho/MCServer/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/tycho/MCServer && $(MAKE) -f CMakeFiles/Makefile2 lib/tolua++/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/tycho/MCServer && $(MAKE) -f CMakeFiles/Makefile2 lib/tolua++/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/tycho/MCServer && $(MAKE) -f CMakeFiles/Makefile2 lib/tolua++/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/tycho/MCServer && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
lib/tolua++/CMakeFiles/tolua.dir/rule:
cd /home/tycho/MCServer && $(MAKE) -f CMakeFiles/Makefile2 lib/tolua++/CMakeFiles/tolua.dir/rule
.PHONY : lib/tolua++/CMakeFiles/tolua.dir/rule
# Convenience name for target.
tolua: lib/tolua++/CMakeFiles/tolua.dir/rule
.PHONY : tolua
# fast build rule for target.
tolua/fast:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolua.dir/build.make lib/tolua++/CMakeFiles/tolua.dir/build
.PHONY : tolua/fast
# Convenience name for target.
lib/tolua++/CMakeFiles/tolualib.dir/rule:
cd /home/tycho/MCServer && $(MAKE) -f CMakeFiles/Makefile2 lib/tolua++/CMakeFiles/tolualib.dir/rule
.PHONY : lib/tolua++/CMakeFiles/tolualib.dir/rule
# Convenience name for target.
tolualib: lib/tolua++/CMakeFiles/tolualib.dir/rule
.PHONY : tolualib
# fast build rule for target.
tolualib/fast:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/build
.PHONY : tolualib/fast
src/bin/tolua.o: src/bin/tolua.c.o
.PHONY : src/bin/tolua.o
# target to build an object file
src/bin/tolua.c.o:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolua.dir/build.make lib/tolua++/CMakeFiles/tolua.dir/src/bin/tolua.c.o
.PHONY : src/bin/tolua.c.o
src/bin/tolua.i: src/bin/tolua.c.i
.PHONY : src/bin/tolua.i
# target to preprocess a source file
src/bin/tolua.c.i:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolua.dir/build.make lib/tolua++/CMakeFiles/tolua.dir/src/bin/tolua.c.i
.PHONY : src/bin/tolua.c.i
src/bin/tolua.s: src/bin/tolua.c.s
.PHONY : src/bin/tolua.s
# target to generate assembly for a file
src/bin/tolua.c.s:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolua.dir/build.make lib/tolua++/CMakeFiles/tolua.dir/src/bin/tolua.c.s
.PHONY : src/bin/tolua.c.s
src/bin/toluabind.o: src/bin/toluabind.c.o
.PHONY : src/bin/toluabind.o
# target to build an object file
src/bin/toluabind.c.o:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolua.dir/build.make lib/tolua++/CMakeFiles/tolua.dir/src/bin/toluabind.c.o
.PHONY : src/bin/toluabind.c.o
src/bin/toluabind.i: src/bin/toluabind.c.i
.PHONY : src/bin/toluabind.i
# target to preprocess a source file
src/bin/toluabind.c.i:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolua.dir/build.make lib/tolua++/CMakeFiles/tolua.dir/src/bin/toluabind.c.i
.PHONY : src/bin/toluabind.c.i
src/bin/toluabind.s: src/bin/toluabind.c.s
.PHONY : src/bin/toluabind.s
# target to generate assembly for a file
src/bin/toluabind.c.s:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolua.dir/build.make lib/tolua++/CMakeFiles/tolua.dir/src/bin/toluabind.c.s
.PHONY : src/bin/toluabind.c.s
src/lib/tolua_event.o: src/lib/tolua_event.c.o
.PHONY : src/lib/tolua_event.o
# target to build an object file
src/lib/tolua_event.c.o:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_event.c.o
.PHONY : src/lib/tolua_event.c.o
src/lib/tolua_event.i: src/lib/tolua_event.c.i
.PHONY : src/lib/tolua_event.i
# target to preprocess a source file
src/lib/tolua_event.c.i:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_event.c.i
.PHONY : src/lib/tolua_event.c.i
src/lib/tolua_event.s: src/lib/tolua_event.c.s
.PHONY : src/lib/tolua_event.s
# target to generate assembly for a file
src/lib/tolua_event.c.s:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_event.c.s
.PHONY : src/lib/tolua_event.c.s
src/lib/tolua_is.o: src/lib/tolua_is.c.o
.PHONY : src/lib/tolua_is.o
# target to build an object file
src/lib/tolua_is.c.o:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_is.c.o
.PHONY : src/lib/tolua_is.c.o
src/lib/tolua_is.i: src/lib/tolua_is.c.i
.PHONY : src/lib/tolua_is.i
# target to preprocess a source file
src/lib/tolua_is.c.i:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_is.c.i
.PHONY : src/lib/tolua_is.c.i
src/lib/tolua_is.s: src/lib/tolua_is.c.s
.PHONY : src/lib/tolua_is.s
# target to generate assembly for a file
src/lib/tolua_is.c.s:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_is.c.s
.PHONY : src/lib/tolua_is.c.s
src/lib/tolua_map.o: src/lib/tolua_map.c.o
.PHONY : src/lib/tolua_map.o
# target to build an object file
src/lib/tolua_map.c.o:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_map.c.o
.PHONY : src/lib/tolua_map.c.o
src/lib/tolua_map.i: src/lib/tolua_map.c.i
.PHONY : src/lib/tolua_map.i
# target to preprocess a source file
src/lib/tolua_map.c.i:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_map.c.i
.PHONY : src/lib/tolua_map.c.i
src/lib/tolua_map.s: src/lib/tolua_map.c.s
.PHONY : src/lib/tolua_map.s
# target to generate assembly for a file
src/lib/tolua_map.c.s:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_map.c.s
.PHONY : src/lib/tolua_map.c.s
src/lib/tolua_push.o: src/lib/tolua_push.c.o
.PHONY : src/lib/tolua_push.o
# target to build an object file
src/lib/tolua_push.c.o:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_push.c.o
.PHONY : src/lib/tolua_push.c.o
src/lib/tolua_push.i: src/lib/tolua_push.c.i
.PHONY : src/lib/tolua_push.i
# target to preprocess a source file
src/lib/tolua_push.c.i:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_push.c.i
.PHONY : src/lib/tolua_push.c.i
src/lib/tolua_push.s: src/lib/tolua_push.c.s
.PHONY : src/lib/tolua_push.s
# target to generate assembly for a file
src/lib/tolua_push.c.s:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_push.c.s
.PHONY : src/lib/tolua_push.c.s
src/lib/tolua_to.o: src/lib/tolua_to.c.o
.PHONY : src/lib/tolua_to.o
# target to build an object file
src/lib/tolua_to.c.o:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_to.c.o
.PHONY : src/lib/tolua_to.c.o
src/lib/tolua_to.i: src/lib/tolua_to.c.i
.PHONY : src/lib/tolua_to.i
# target to preprocess a source file
src/lib/tolua_to.c.i:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_to.c.i
.PHONY : src/lib/tolua_to.c.i
src/lib/tolua_to.s: src/lib/tolua_to.c.s
.PHONY : src/lib/tolua_to.s
# target to generate assembly for a file
src/lib/tolua_to.c.s:
cd /home/tycho/MCServer && $(MAKE) -f lib/tolua++/CMakeFiles/tolualib.dir/build.make lib/tolua++/CMakeFiles/tolualib.dir/src/lib/tolua_to.c.s
.PHONY : src/lib/tolua_to.c.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... tolua"
@echo "... tolualib"
@echo "... src/bin/tolua.o"
@echo "... src/bin/tolua.i"
@echo "... src/bin/tolua.s"
@echo "... src/bin/toluabind.o"
@echo "... src/bin/toluabind.i"
@echo "... src/bin/toluabind.s"
@echo "... src/lib/tolua_event.o"
@echo "... src/lib/tolua_event.i"
@echo "... src/lib/tolua_event.s"
@echo "... src/lib/tolua_is.o"
@echo "... src/lib/tolua_is.i"
@echo "... src/lib/tolua_is.s"
@echo "... src/lib/tolua_map.o"
@echo "... src/lib/tolua_map.i"
@echo "... src/lib/tolua_map.s"
@echo "... src/lib/tolua_push.o"
@echo "... src/lib/tolua_push.i"
@echo "... src/lib/tolua_push.s"
@echo "... src/lib/tolua_to.o"
@echo "... src/lib/tolua_to.i"
@echo "... src/lib/tolua_to.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/tycho/MCServer && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system