build: add a Makefile to run cmake automagically

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-01 08:25:40 +02:00
parent 1bdf22f631
commit 84373e6513
3 changed files with 45 additions and 5 deletions

3
.gitignore vendored
View File

@ -7,7 +7,6 @@ awesome
awesome-client awesome-client
doc doc
config.h config.h
Makefile
CMakeCache.txt CMakeCache.txt
CMakeFiles/ CMakeFiles/
CPackConfig.cmake CPackConfig.cmake
@ -33,3 +32,5 @@ common/tokenize.[hc]
common/atoms-*.h common/atoms-*.h
luadoc luadoc
lib/capi.lua lib/capi.lua
build
.build*

36
Makefile Executable file
View File

@ -0,0 +1,36 @@
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

11
README
View File

@ -5,7 +5,8 @@ awesome is an extremely fast, small, and dynamic window manager for X.
Requirements Requirements
------------ ------------
In order to build awesome itself, you need header files and libs of: In order to build awesome itself, you need header files and libs of:
- Xlib, xcb and xcb-util. - cmake
- Xlib, xcb and xcb-util
- Lua 5.1 - Lua 5.1
- cairo - cairo
- pango and pangocairo - pango and pangocairo
@ -30,11 +31,13 @@ Building and Installation
------------------------- -------------------------
After extracting the dist tarball, run: After extracting the dist tarball, run:
cmake .
make make
make install # might need root permissions
The source code reference can be built with "make doc". This will create a build directory, run cmake in it and build awesome.
After the building done, you can type this to install:
make install # might need root permissions
Running awesome Running awesome
----------- -----------