awesome/Makefile
Julien Danjou 84373e6513 build: add a Makefile to run cmake automagically
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 08:25:40 +02:00

36 lines
733 B
Makefile
Executable file

builddir=.build-$(shell hostname)-$(shell gcc -dumpmachine)-$(shell gcc -dumpversion)
all: cmake
@echo "Building…"
make -C build
install: cmake
@echo "Installing…"
make -C build install
cmake: build CMakeLists.txt
CMakeLists.txt: awesomeConfig.cmake
awesomeConfig.cmake:
@echo "Running cmake…"
cd ${builddir} && cmake "$@" ..
build:
@echo -n "Creating new build directory…"
@mkdir -p ${builddir}
@echo " done"
@echo -n "Setting up links…"
@rm build
@ln -s ${builddir} build
@rm awesome awesome-client
@ln -s ${builddir}/awesome awesome
@ln -s ${builddir}/awesome-client awesome-client
@echo " done"
clean:
@echo -n "Cleaning up build directory…"
@rm -rf ${builddir}
@echo " done"
.PHONY: clean