paysages: Build configurations.

git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@246 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
Michaël Lemaire 2012-01-28 17:24:19 +00:00 committed by ThunderK
parent ad491d300b
commit 318bb99ba4
4 changed files with 62 additions and 83 deletions

View file

@ -1,17 +1,26 @@
BUILDMODE=debug
BUILDPATH=./build/${BUILDMODE}
all:
@+cd lib_paysages && make
@+cd cli && make
@+cd gui_qt && qmake && make
@+cd lib_paysages && make BUILDMODE=${BUILDMODE}
@+cd cli && make BUILDMODE=${BUILDMODE}
@+cd gui_qt && qmake "BUILDMODE=${BUILDMODE}" && make
clean:
cd lib_paysages && make clean
cd cli && make clean
cd gui_qt && make clean && rm -f paysages-qt
cd lib_paysages && make clean BUILDMODE=${BUILDMODE}
cd cli && make clean BUILDMODE=${BUILDMODE}
cd gui_qt && qmake "BUILDMODE=${BUILDMODE}" && make clean
rm -f ${BUILDPATH}/paysages-qt
rm -f ${BUILDPATH}/paysages-cli
rm -f ${BUILDPATH}/libpaysages.so
release:
make BUILDMODE=release all
run_cli:
LD_LIBRARY_PATH=lib_paysages ./cli/paysages-cli
LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-cli
run_qt:
LD_LIBRARY_PATH=lib_paysages ./gui_qt/paysages-qt
LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-qt
.PHONY:all clean
.PHONY:all clean release

View file

@ -1,21 +1,27 @@
BUILDMODE=debug
BUILDPATH=../build/${BUILDMODE}
SOURCES=$(wildcard *.c)
OBJECTS=${SOURCES:.c=.o}
OBJECTS=${SOURCES:%.c=obj/%.o}
HEADERS=$(wildcard ../lib_paysages/shared/*.h ../lib_paysages/*.h *.h)
RESULT=paysages-cli
RESULT=${BUILDPATH}/paysages-cli
CC_FLAGS=-g -pg -Wall
CC_LDFLAGS=-L../lib_paysages/ -lpaysages
CC_LDFLAGS=-L${BUILDPATH} -lpaysages
all:${RESULT}
all:prepare ${RESULT}
prepare:
mkdir -p ./obj
mkdir -p ${BUILDPATH}
clean:
rm -f ${OBJECTS}
rm -f ${RESULT}
%.o:%.c ${HEADERS}
obj/%.o:%.c ${HEADERS}
${CC} -c ${CC_FLAGS} $< -o $@
${RESULT}:${OBJECTS}
${CC} $^ ${CC_LDFLAGS} -o $@
.PHONY:all clean
.PHONY:all clean prepare

View file

@ -1,65 +1,15 @@
######################################################################
# Automatically generated by qmake (2.01a) dim. dc. 25 21:03:17 2011
######################################################################
TEMPLATE = app
CONFIG += qt
QT += opengl
TARGET =
QT += core gui opengl
DEPENDPATH += .
INCLUDEPATH += .
unix:CONFIG += debug
win32:CONFIG += release
OBJECTS_DIR = ./obj/$$BUILDMODE/
MOC_DIR = ./moc/$$BUILDMODE/
DESTDIR = ../build/$$BUILDMODE/
CONFIG += $$BUILDMODE
unix:LIBS += -L../lib_paysages/ -lpaysages
win32:LIBS += ../libpaysages.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0
unix:LIBS += -L$$DESTDIR -lpaysages
win32:LIBS += $$DESTDIR/libpaysages.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0
# Input
HEADERS += ../lib_paysages/shared/functions.h ../lib_paysages/shared/types.h \
baseform.h \
baseinput.h \
dialognoise.h \
dialogrender.h \
dialogwanderer.h \
formatmosphere.h \
formclouds.h \
formlighting.h \
formrender.h \
formsky.h \
formterrain.h \
formtextures.h \
formwater.h \
inputcamera.h \
inputcolor.h \
inputcolorgradation.h \
inputdouble.h \
inputint.h \
inputnoise.h \
mainwindow.h \
preview.h \
tools.h \
widgetwanderer.h
FORMS +=
SOURCES += \
baseform.cpp \
baseinput.cpp \
dialognoise.cpp \
dialogrender.cpp \
dialogwanderer.cpp \
formatmosphere.cpp \
formclouds.cpp \
formlighting.cpp \
formrender.cpp \
formsky.cpp \
formterrain.cpp \
formtextures.cpp \
formwater.cpp \
inputcamera.cpp \
inputcolor.cpp \
inputcolorgradation.cpp \
inputdouble.cpp \
inputint.cpp \
inputnoise.cpp \
mainwindow.cpp \
preview.cpp \
widgetwanderer.cpp
HEADERS += $$files(*.h) $$files(../lib_paysages/*.h) $$files(../lib_paysages/shared/*.h)
SOURCES += $$files(*.cpp)

View file

@ -1,21 +1,35 @@
SOURCES=$(wildcard *.c)
OBJECTS=${SOURCES:.c=.o}
HEADERS=$(wildcard shared/*.h *.h)
RESULT=libpaysages.so
CC_FLAGS=-g -pg -Wall -fPIC $(shell pkg-config --cflags glib-2.0 gthread-2.0)
CC_LDFLAGS=$(shell pkg-config --libs glib-2.0 gthread-2.0) -lIL -lILU
BUILDMODE = debug
BUILDPATH = ../build/${BUILDMODE}
OBJPATH = ./obj/${BUILDMODE}
SOURCES = $(wildcard *.c)
OBJECTS = ${SOURCES:%.c=${OBJPATH}/%.o}
HEADERS = $(wildcard shared/*.h *.h)
RESULT = ${BUILDPATH}/libpaysages.so
CC_FLAGS = -Wall -fPIC $(shell pkg-config --cflags glib-2.0 gthread-2.0)
CC_LDFLAGS = $(shell pkg-config --libs glib-2.0 gthread-2.0) -lIL -lILU
all:${RESULT}
ifeq ($(BUILDMODE),debug)
CC_FLAGS += -g -pg
endif
ifeq ($(BUILDMODE),release)
CC_FLAGS += -O3 -DNDEBUG
endif
all:prepare ${RESULT}
prepare:
mkdir -p ${OBJPATH}
mkdir -p ${BUILDPATH}
clean:
rm -f ${OBJECTS}
rm -f ${RESULT}
%.o:%.c ${HEADERS}
${OBJPATH}/%.o:%.c ${HEADERS}
${CC} -c ${CC_FLAGS} $< -o $@
${RESULT}:${OBJECTS}
${CC} $^ -shared ${CC_LDFLAGS} -o $@
.PHONY:all clean
.PHONY:all clean prepare