Michaël Lemaire
318bb99ba4
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@246 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
27 lines
515 B
Makefile
27 lines
515 B
Makefile
BUILDMODE=debug
|
|
BUILDPATH=../build/${BUILDMODE}
|
|
SOURCES=$(wildcard *.c)
|
|
OBJECTS=${SOURCES:%.c=obj/%.o}
|
|
HEADERS=$(wildcard ../lib_paysages/shared/*.h ../lib_paysages/*.h *.h)
|
|
RESULT=${BUILDPATH}/paysages-cli
|
|
CC_FLAGS=-g -pg -Wall
|
|
CC_LDFLAGS=-L${BUILDPATH} -lpaysages
|
|
|
|
all:prepare ${RESULT}
|
|
|
|
prepare:
|
|
mkdir -p ./obj
|
|
mkdir -p ${BUILDPATH}
|
|
|
|
clean:
|
|
rm -f ${OBJECTS}
|
|
rm -f ${RESULT}
|
|
|
|
obj/%.o:%.c ${HEADERS}
|
|
${CC} -c ${CC_FLAGS} $< -o $@
|
|
|
|
${RESULT}:${OBJECTS}
|
|
${CC} $^ ${CC_LDFLAGS} -o $@
|
|
|
|
.PHONY:all clean prepare
|
|
|