2008-07-01 08:25:40 +02:00
|
|
|
builddir=.build-$(shell hostname)-$(shell gcc -dumpmachine)-$(shell gcc -dumpversion)
|
|
|
|
|
2008-07-01 21:19:09 +02:00
|
|
|
ifeq (,$(VERBOSE))
|
|
|
|
MAKEFLAGS:=$(MAKEFLAGS)s
|
|
|
|
ECHO=echo
|
|
|
|
else
|
|
|
|
ECHO=@:
|
|
|
|
endif
|
|
|
|
|
2008-07-01 08:25:40 +02:00
|
|
|
all: cmake
|
2008-07-01 21:19:09 +02:00
|
|
|
$(ECHO) "Building…"
|
|
|
|
$(MAKE) -C build
|
2008-07-01 08:25:40 +02:00
|
|
|
|
|
|
|
install: cmake
|
2008-07-01 21:19:09 +02:00
|
|
|
$(ECHO) "Installing…"
|
|
|
|
$(MAKE) -C build install
|
2008-07-01 08:25:40 +02:00
|
|
|
|
2008-07-01 17:07:51 +02:00
|
|
|
cmake: build/cmake-stamp
|
|
|
|
build/cmake-stamp: build CMakeLists.txt awesomeConfig.cmake
|
2008-07-01 21:19:09 +02:00
|
|
|
$(ECHO) "Running cmake…"
|
2008-07-01 08:25:40 +02:00
|
|
|
cd ${builddir} && cmake "$@" ..
|
2008-07-01 17:07:51 +02:00
|
|
|
touch ${builddir}/cmake-stamp
|
2008-07-01 08:25:40 +02:00
|
|
|
|
2008-07-01 17:07:51 +02:00
|
|
|
build: awesome awesome-client
|
2008-07-01 21:19:09 +02:00
|
|
|
$(ECHO) -n "Creating new build directory…"
|
|
|
|
mkdir -p ${builddir}
|
|
|
|
ln -s -f ${builddir} build
|
|
|
|
$(ECHO) " done"
|
2008-07-01 08:25:40 +02:00
|
|
|
|
2008-07-01 17:07:51 +02:00
|
|
|
awesome:
|
|
|
|
@ln -s -f ${builddir}/awesome awesome
|
2008-07-01 08:25:40 +02:00
|
|
|
|
2008-07-01 17:07:51 +02:00
|
|
|
awesome-client:
|
|
|
|
@ln -s -f ${builddir}/awesome-client awesome-client
|
2008-07-01 08:25:40 +02:00
|
|
|
|
|
|
|
clean:
|
2008-07-01 21:19:09 +02:00
|
|
|
$(ECHO) -n "Cleaning up build directory…"
|
2008-07-01 17:07:51 +02:00
|
|
|
@rm -rf ${builddir} build
|
2008-07-01 21:19:09 +02:00
|
|
|
$(ECHO) " done"
|
2008-07-01 08:25:40 +02:00
|
|
|
|
|
|
|
.PHONY: clean
|