2012-01-28 17:24:19 +00:00
|
|
|
BUILDMODE=debug
|
|
|
|
BUILDPATH=../build/${BUILDMODE}
|
2012-01-10 20:51:27 +00:00
|
|
|
SOURCES=$(wildcard *.c)
|
2012-01-28 17:24:19 +00:00
|
|
|
OBJECTS=${SOURCES:%.c=obj/%.o}
|
2012-01-10 20:51:27 +00:00
|
|
|
HEADERS=$(wildcard ../lib_paysages/shared/*.h ../lib_paysages/*.h *.h)
|
2012-01-28 17:24:19 +00:00
|
|
|
RESULT=${BUILDPATH}/paysages-cli
|
2012-01-10 20:51:27 +00:00
|
|
|
CC_FLAGS=-g -pg -Wall
|
2012-01-28 17:24:19 +00:00
|
|
|
CC_LDFLAGS=-L${BUILDPATH} -lpaysages
|
2012-01-10 20:51:27 +00:00
|
|
|
|
2012-01-28 17:24:19 +00:00
|
|
|
all:prepare ${RESULT}
|
|
|
|
|
|
|
|
prepare:
|
|
|
|
mkdir -p ./obj
|
|
|
|
mkdir -p ${BUILDPATH}
|
2012-01-10 20:51:27 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f ${OBJECTS}
|
|
|
|
rm -f ${RESULT}
|
|
|
|
|
2012-01-28 17:24:19 +00:00
|
|
|
obj/%.o:%.c ${HEADERS}
|
2012-01-10 20:51:27 +00:00
|
|
|
${CC} -c ${CC_FLAGS} $< -o $@
|
|
|
|
|
|
|
|
${RESULT}:${OBJECTS}
|
|
|
|
${CC} $^ ${CC_LDFLAGS} -o $@
|
|
|
|
|
2012-01-28 17:24:19 +00:00
|
|
|
.PHONY:all clean prepare
|
2012-01-10 20:51:27 +00:00
|
|
|
|