paysages: Build configurations.
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@246 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
ad491d300b
commit
318bb99ba4
4 changed files with 62 additions and 83 deletions
27
Makefile
27
Makefile
|
@ -1,17 +1,26 @@
|
||||||
|
BUILDMODE=debug
|
||||||
|
BUILDPATH=./build/${BUILDMODE}
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@+cd lib_paysages && make
|
@+cd lib_paysages && make BUILDMODE=${BUILDMODE}
|
||||||
@+cd cli && make
|
@+cd cli && make BUILDMODE=${BUILDMODE}
|
||||||
@+cd gui_qt && qmake && make
|
@+cd gui_qt && qmake "BUILDMODE=${BUILDMODE}" && make
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cd lib_paysages && make clean
|
cd lib_paysages && make clean BUILDMODE=${BUILDMODE}
|
||||||
cd cli && make clean
|
cd cli && make clean BUILDMODE=${BUILDMODE}
|
||||||
cd gui_qt && make clean && rm -f paysages-qt
|
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:
|
run_cli:
|
||||||
LD_LIBRARY_PATH=lib_paysages ./cli/paysages-cli
|
LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-cli
|
||||||
|
|
||||||
run_qt:
|
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
|
||||||
|
|
18
cli/Makefile
18
cli/Makefile
|
@ -1,21 +1,27 @@
|
||||||
|
BUILDMODE=debug
|
||||||
|
BUILDPATH=../build/${BUILDMODE}
|
||||||
SOURCES=$(wildcard *.c)
|
SOURCES=$(wildcard *.c)
|
||||||
OBJECTS=${SOURCES:.c=.o}
|
OBJECTS=${SOURCES:%.c=obj/%.o}
|
||||||
HEADERS=$(wildcard ../lib_paysages/shared/*.h ../lib_paysages/*.h *.h)
|
HEADERS=$(wildcard ../lib_paysages/shared/*.h ../lib_paysages/*.h *.h)
|
||||||
RESULT=paysages-cli
|
RESULT=${BUILDPATH}/paysages-cli
|
||||||
CC_FLAGS=-g -pg -Wall
|
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:
|
clean:
|
||||||
rm -f ${OBJECTS}
|
rm -f ${OBJECTS}
|
||||||
rm -f ${RESULT}
|
rm -f ${RESULT}
|
||||||
|
|
||||||
%.o:%.c ${HEADERS}
|
obj/%.o:%.c ${HEADERS}
|
||||||
${CC} -c ${CC_FLAGS} $< -o $@
|
${CC} -c ${CC_FLAGS} $< -o $@
|
||||||
|
|
||||||
${RESULT}:${OBJECTS}
|
${RESULT}:${OBJECTS}
|
||||||
${CC} $^ ${CC_LDFLAGS} -o $@
|
${CC} $^ ${CC_LDFLAGS} -o $@
|
||||||
|
|
||||||
.PHONY:all clean
|
.PHONY:all clean prepare
|
||||||
|
|
||||||
|
|
|
@ -1,65 +1,15 @@
|
||||||
######################################################################
|
|
||||||
# Automatically generated by qmake (2.01a) dim. dc. 25 21:03:17 2011
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
CONFIG += qt
|
CONFIG += qt
|
||||||
QT += opengl
|
QT += core gui opengl
|
||||||
TARGET =
|
|
||||||
DEPENDPATH += .
|
DEPENDPATH += .
|
||||||
INCLUDEPATH += .
|
INCLUDEPATH += .
|
||||||
unix:CONFIG += debug
|
OBJECTS_DIR = ./obj/$$BUILDMODE/
|
||||||
win32:CONFIG += release
|
MOC_DIR = ./moc/$$BUILDMODE/
|
||||||
|
DESTDIR = ../build/$$BUILDMODE/
|
||||||
|
CONFIG += $$BUILDMODE
|
||||||
|
|
||||||
unix:LIBS += -L../lib_paysages/ -lpaysages
|
unix:LIBS += -L$$DESTDIR -lpaysages
|
||||||
win32:LIBS += ../libpaysages.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0
|
win32:LIBS += $$DESTDIR/libpaysages.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0
|
||||||
|
|
||||||
# Input
|
HEADERS += $$files(*.h) $$files(../lib_paysages/*.h) $$files(../lib_paysages/shared/*.h)
|
||||||
HEADERS += ../lib_paysages/shared/functions.h ../lib_paysages/shared/types.h \
|
SOURCES += $$files(*.cpp)
|
||||||
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
|
|
||||||
|
|
|
@ -1,21 +1,35 @@
|
||||||
|
BUILDMODE = debug
|
||||||
|
BUILDPATH = ../build/${BUILDMODE}
|
||||||
|
OBJPATH = ./obj/${BUILDMODE}
|
||||||
SOURCES = $(wildcard *.c)
|
SOURCES = $(wildcard *.c)
|
||||||
OBJECTS=${SOURCES:.c=.o}
|
OBJECTS = ${SOURCES:%.c=${OBJPATH}/%.o}
|
||||||
HEADERS = $(wildcard shared/*.h *.h)
|
HEADERS = $(wildcard shared/*.h *.h)
|
||||||
RESULT=libpaysages.so
|
RESULT = ${BUILDPATH}/libpaysages.so
|
||||||
CC_FLAGS=-g -pg -Wall -fPIC $(shell pkg-config --cflags glib-2.0 gthread-2.0)
|
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
|
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:
|
clean:
|
||||||
rm -f ${OBJECTS}
|
rm -f ${OBJECTS}
|
||||||
rm -f ${RESULT}
|
rm -f ${RESULT}
|
||||||
|
|
||||||
%.o:%.c ${HEADERS}
|
${OBJPATH}/%.o:%.c ${HEADERS}
|
||||||
${CC} -c ${CC_FLAGS} $< -o $@
|
${CC} -c ${CC_FLAGS} $< -o $@
|
||||||
|
|
||||||
${RESULT}:${OBJECTS}
|
${RESULT}:${OBJECTS}
|
||||||
${CC} $^ -shared ${CC_LDFLAGS} -o $@
|
${CC} $^ -shared ${CC_LDFLAGS} -o $@
|
||||||
|
|
||||||
.PHONY:all clean
|
.PHONY:all clean prepare
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue