From 6c4fe3323d79253af707df90623e433ce12c35f2 Mon Sep 17 00:00:00 2001 From: scarab Date: Sat, 5 Jul 2008 16:43:55 +0000 Subject: * Prechod na novou verzi instalace pseudoautotools -> cmake * Odstraneni bordelu kterej tu byl (pokud vam neco chybi brecte na me ja to zkusim najit v zaloze) * TODO instalace: SEPSAT AUTORY, IKONKU VYROBIT git-svn-id: http://opensvn.csie.org/tuxanci_ng@94 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/modules/CMakeLists.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++ src/modules/Makefile | 31 --------------------------- src/modules/modAI.c | 20 +++++++++--------- src/modules/modPipe.c | 20 +++++++++--------- src/modules/modTeleport.c | 20 +++++++++--------- src/modules/modWall.c | 20 +++++++++--------- 6 files changed, 92 insertions(+), 71 deletions(-) create mode 100644 src/modules/CMakeLists.txt delete mode 100755 src/modules/Makefile (limited to 'src/modules') diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt new file mode 100644 index 0000000..f24230e --- /dev/null +++ b/src/modules/CMakeLists.txt @@ -0,0 +1,52 @@ +#SET ( WORKDIR ${CMAKE_SOURCE_DIR}/src ) +INCLUDE_DIRECTORIES ( ${WORKDIR}/base ) +IF ( NO_Server ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/client ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/screen ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/widget ) + FIND_PACKAGE ( SDL REQUIRED ) + FIND_PACKAGE ( SDL_image REQUIRED ) + FIND_PACKAGE ( SDL_ttf REQUIRED ) + INCLUDE_DIRECTORIES ( ${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR} ) + IF ( NOT NO_Audio ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/audio ) + FIND_PACKAGE ( SDL_mixer REQUIRED ) + INCLUDE_DIRECTORIES ( ${SDLMIXER_INCLUDE_DIR} ) + LINK_LIBRARIES ( ${CMAKE_DL_LIBS} ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} SDLmain ) + ELSE (NOT NO_Audio) + ADD_DEFINITIONS ( -DNO_SOUND ) + LINK_LIBRARIES ( ${CMAKE_DL_LIBS} ${SDL_LIBRARY} SDLmain ) + ENDIF ( NOT NO_Audio ) +ELSE ( NO_Server ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/server ) + ADD_DEFINITIONS ( -DPUBLIC_SERVER ) + ADD_DEFINITIONS ( -DNO_SOUND ) +ENDIF ( NO_Server ) +SET ( SRC_base_modules +${WORKDIR}/base/index.c ${WORKDIR}/base/space.c ${WORKDIR}/base/list.c +) +SET ( SRC_modWall +${SRC_base_modules} +modWall.c +) +SET ( SRC_modPipe +${SRC_base_modules} +modPipe.c +) +SET ( SRC_modTeleport +${SRC_base_modules} +modTeleport.c +) +SET ( SRC_modAI +${SRC_base_modules} +modAI.c +) + +ADD_LIBRARY ( modWall SHARED ${SRC_modWall} ) +ADD_LIBRARY ( modPipe SHARED ${SRC_modPipe} ) +ADD_LIBRARY ( modTeleport SHARED ${SRC_modTeleport} ) +ADD_LIBRARY ( modAI SHARED ${SRC_modAI} ) +INSTALL ( TARGETS modWall LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) +INSTALL ( TARGETS modPipe LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) +INSTALL ( TARGETS modTeleport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) +INSTALL ( TARGETS modAI LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) \ No newline at end of file diff --git a/src/modules/Makefile b/src/modules/Makefile deleted file mode 100755 index 81f6c54..0000000 --- a/src/modules/Makefile +++ /dev/null @@ -1,31 +0,0 @@ - -all: modWall.so modPipe.so modTeleport.so modAI.so - -list.o: ../base/list.c ../base/list.h - $(CC) $(CFLAGS) -fPIC -o list.o -c ../base/list.c - -space.o: ../base/space.c ../base/space.h - $(CC) $(CFLAGS) -fPIC -o space.o -c ../base/space.c - -index.o: ../base/index.c ../base/index.h - $(CC) $(CFLAGS) -fPIC -o index.o -c ../base/index.c - -modWall.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modWall.c -o modWall.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modWall.so modWall.o list.o space.o index.o - -modPipe.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modPipe.c -o modPipe.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modPipe.so modPipe.o list.o space.o index.o - -modTeleport.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modTeleport.c -o modTeleport.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modTeleport.so modTeleport.o list.o space.o index.o - -modAI.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modAI.c -o modAI.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modAI.so modAI.o list.o space.o index.o - -clean: - rm -rf *.o - rm -rf *.so diff --git a/src/modules/modAI.c b/src/modules/modAI.c index d3a9f78..53f689e 100755 --- a/src/modules/modAI.c +++ b/src/modules/modAI.c @@ -4,21 +4,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif static export_fce_t *export_fce; diff --git a/src/modules/modPipe.c b/src/modules/modPipe.c index 77f2c05..2c1a6e5 100755 --- a/src/modules/modPipe.c +++ b/src/modules/modPipe.c @@ -4,21 +4,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif typedef struct pipe_struct diff --git a/src/modules/modTeleport.c b/src/modules/modTeleport.c index 724e371..2b94e2f 100755 --- a/src/modules/modTeleport.c +++ b/src/modules/modTeleport.c @@ -4,21 +4,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif typedef struct teleport_struct diff --git a/src/modules/modWall.c b/src/modules/modWall.c index 35d84e6..7d36957 100755 --- a/src/modules/modWall.c +++ b/src/modules/modWall.c @@ -3,21 +3,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif typedef struct wall_struct -- cgit v1.2.3