paysages: Refactoring sources (WIP)
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@199 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
501ccd10ba
commit
bfd25bcf42
38 changed files with 28 additions and 26 deletions
|
@ -1,26 +0,0 @@
|
||||||
cmake_minimum_required(VERSION 2.8)
|
|
||||||
project(paysages)
|
|
||||||
|
|
||||||
include(FindPkgConfig)
|
|
||||||
|
|
||||||
find_package(DevIL)
|
|
||||||
|
|
||||||
pkg_check_modules(GTK3 gtk+-3.0)
|
|
||||||
|
|
||||||
include_directories(${IL_INCLUDE_DIR})
|
|
||||||
include_directories(${GTK3_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
aux_source_directory(src SOURCE_FILES)
|
|
||||||
aux_source_directory(src/gui SOURCE_FILES)
|
|
||||||
|
|
||||||
#set(CMAKE_C_FLAGS "${GTK3_CFLAGS_OTHER}")
|
|
||||||
set(CMAKE_C_FLAGS_PROFILE "-pg -O0")
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall")
|
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
|
||||||
set(CMAKE_BUILD_TYPE debug)
|
|
||||||
endif(NOT CMAKE_BUILD_TYPE)
|
|
||||||
|
|
||||||
add_executable(paysages ${SOURCE_FILES})
|
|
||||||
target_link_libraries(paysages ${IL_LIBRARIES} ${ILU_LIBRARIES} ${GTK3_LIBRARIES})
|
|
||||||
|
|
7
Makefile
Normal file
7
Makefile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
all:
|
||||||
|
cd lib_paysages && make
|
||||||
|
|
||||||
|
clean:
|
||||||
|
cd lib_paysages && make clean
|
||||||
|
|
||||||
|
.PHONY:all clean
|
21
lib_paysages/Makefile
Normal file
21
lib_paysages/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
SOURCES=$(wildcard *.c)
|
||||||
|
OBJECTS=${SOURCES:.c=.o}
|
||||||
|
HEADERS=$(wildcard shared/*.h *.h)
|
||||||
|
RESULT=libpaysages.so
|
||||||
|
CC_FLAGS=-g -pg -Wall $(shell pkg-config --cflags glib-2.0)
|
||||||
|
CC_LDFLAGS=$(shell pkg-config --libs glib-2.0)
|
||||||
|
|
||||||
|
all:${RESULT}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ${OBJECTS}
|
||||||
|
rm -f ${RESULT}
|
||||||
|
|
||||||
|
%.o:%.c ${HEADERS}
|
||||||
|
${CC} -c ${CC_FLAGS} $< -o $@
|
||||||
|
|
||||||
|
${RESULT}:${OBJECTS}
|
||||||
|
${CC} -o $@ -shared -Wl ${CC_LDFLAGS} $*
|
||||||
|
|
||||||
|
.PHONY:all clean
|
||||||
|
|
Loading…
Reference in a new issue