forked from github/server
update makefile to new structure
This commit is contained in:
parent
78b2360f7f
commit
a11e119419
|
@ -0,0 +1,13 @@
|
||||||
|
bin/
|
||||||
|
Debug/
|
||||||
|
Release/
|
||||||
|
*~
|
||||||
|
*.user
|
||||||
|
*.pdb
|
||||||
|
*.suo
|
||||||
|
*.sdf
|
||||||
|
*.opensdf
|
||||||
|
*.ipch
|
||||||
|
*.sh
|
||||||
|
src/*.vcproj.*.user
|
||||||
|
tags
|
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 2.4)
|
cmake_minimum_required(VERSION 2.4)
|
||||||
project (example C)
|
project (server C)
|
||||||
|
|
||||||
## CMake configuration ##
|
## CMake configuration ##
|
||||||
# You can pass these to cmake with -DNEED_OPTION=1
|
# You can pass these to cmake with -DNEED_OPTION=1
|
||||||
|
@ -18,55 +18,50 @@ endif(${CMAKE_C_COMPILER} MATCHES ".*gcc")
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
|
||||||
|
include_directories ( ../dependencies/pdcurses )
|
||||||
else (WIN32)
|
else (WIN32)
|
||||||
include_directories (/usr/include/lua5.1/ /usr/include/libxml2)
|
include_directories ( /usr/include/lua5.1/ /usr/include/libxml2 )
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
include_directories (
|
include_directories (
|
||||||
../external/bson
|
../dependencies/bson
|
||||||
../external/crypto
|
../dependencies/crypto
|
||||||
../external/cutest
|
../dependencies/cutest
|
||||||
../external/critbit
|
../dependencies/critbit
|
||||||
../external/iniparser
|
../dependencies/iniparser
|
||||||
../external/pdcurses
|
../dependencies/quicklist
|
||||||
../external/quicklist
|
../core/src
|
||||||
../shared/src
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set (LIB_SRCS
|
set (LIB_SRCS
|
||||||
../external/bson/bson.c
|
../dependencies/bson/bson.c
|
||||||
../external/bson/numbers.c
|
../dependencies/bson/numbers.c
|
||||||
../external/critbit/critbit.c
|
../dependencies/critbit/critbit.c
|
||||||
../external/crypto/md5.c
|
../dependencies/crypto/md5.c
|
||||||
../external/crypto/mt19937ar.c
|
../dependencies/crypto/mt19937ar.c
|
||||||
../external/cutest/CuTest.c
|
../dependencies/cutest/CuTest.c
|
||||||
../external/dlmalloc/malloc.c
|
../dependencies/dlmalloc/malloc.c
|
||||||
../external/quicklist/quicklist.c
|
../dependencies/quicklist/quicklist.c
|
||||||
../external/iniparser/iniparser.c
|
../dependencies/iniparser/iniparser.c
|
||||||
../shared/src/build/gamecode.c
|
../core/src/build/gamecode.c
|
||||||
../shared/src/build/kernel.c
|
../core/src/build/kernel.c
|
||||||
../shared/src/build/lib.c
|
../core/src/build/lib.c
|
||||||
../shared/src/build/util.c
|
../core/src/build/util.c
|
||||||
)
|
)
|
||||||
|
|
||||||
set (LINK_LIBS tolua xml2 ncurses lua5.1 pthread)
|
set (LINK_LIBS tolua xml2 ncurses lua5.1 pthread)
|
||||||
|
|
||||||
if (NEED_SQLITE)
|
if (NEED_SQLITE)
|
||||||
set(LIB_SRCS
|
set( LIB_SRCS ${LIB_SRCS} ../dependencies/sqlite3/sqlite3.c )
|
||||||
${LIB_SRCS}
|
include_directories ( ../dependencies/sqlite3 )
|
||||||
../external/sqlite3/sqlite3.c
|
|
||||||
)
|
|
||||||
include_directories (../external/sqlite3)
|
|
||||||
else (NEED_SQLITE)
|
else (NEED_SQLITE)
|
||||||
set (LINK_LIBS ${LINK_LIBS} sqlite3)
|
set ( LINK_LIBS ${LINK_LIBS} sqlite3 )
|
||||||
endif (NEED_SQLITE)
|
endif (NEED_SQLITE)
|
||||||
|
|
||||||
set (EXE_SRCS
|
set ( EXE_SRCS src/server.c )
|
||||||
src/server.c
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable (example ${LIB_SRCS} ${EXE_SRCS})
|
add_executable ( server ${LIB_SRCS} ${EXE_SRCS} )
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
else (WIN32)
|
else (WIN32)
|
||||||
target_link_libraries (example ${LINK_LIBS})
|
target_link_libraries (server ${LINK_LIBS})
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
|
||||||
|
Katja Zedel <katze@felidae.kn-bremen.de
|
||||||
|
Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
|
copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
Loading…
Reference in New Issue