17 Commits

Author SHA1 Message Date
Michael Stapelberg
95cdfe5cb6 makefile: remove the old loglevels.tmp and loglevels.h on 'make clean' 2012-08-07 10:03:10 +02:00
Michael Stapelberg
48f1e383ca makefile: canonicalize path when compiling
Compilers store the path with which they were called in the debug
symbols. Therefore, this will make backtraces show something like
../i3-4.2/src/main.c instead of src/main.c.

See also http://stackoverflow.com/questions/6473561/
2012-08-05 17:00:24 +02:00
Michael Stapelberg
952e5b6059 pre-compile all.h, saves quite some build time
before:

$ time CC=clang make -j16
CC=clang make -j16  6,04s user 0,86s system 468% cpu 1,471 total
CC=clang make -j16  6,05s user 0,87s system 468% cpu 1,477 total
CC=clang make -j16  6,15s user 0,86s system 464% cpu 1,510 total
CC=clang make -j16  6,05s user 0,93s system 467% cpu 1,493 total
CC=clang make -j16  6,10s user 0,84s system 461% cpu 1,507 total

$ time CC=gcc make -j16
CC=gcc make -j16  9,91s user 1,43s system 508% cpu 2,231 total
CC=gcc make -j16  10,02s user 1,37s system 500% cpu 2,275 total
CC=gcc make -j16  9,80s user 1,60s system 507% cpu 2,245 total
CC=gcc make -j16  10,02s user 1,44s system 506% cpu 2,264 total
CC=gcc make -j16  9,99s user 1,45s system 505% cpu 2,261 total

after:

$ time CC=clang make -j16
CC=clang make -j16  3,41s user 0,83s system 375% cpu 1,131 total
CC=clang make -j16  3,29s user 0,90s system 373% cpu 1,122 total
CC=clang make -j16  3,35s user 0,77s system 369% cpu 1,116 total
CC=clang make -j16  3,36s user 0,78s system 374% cpu 1,105 total
CC=clang make -j16  3,46s user 0,75s system 373% cpu 1,126 total

$ time CC=gcc make -j16
CC=gcc make -j16  10,74s user 1,44s system 494% cpu 2,462 total
CC=gcc make -j16  10,68s user 1,54s system 497% cpu 2,453 total
CC=gcc make -j16  10,60s user 1,60s system 488% cpu 2,499 total
CC=gcc make -j16  10,63s user 1,51s system 485% cpu 2,502 total
CC=gcc make -j16  10,70s user 1,51s system 497% cpu 2,453 total

Therefore, we enable pre-compiled headers only when CC=clang.
2012-08-05 16:44:11 +02:00
Quentin Glidic
0b4ee7a1da common.mk: Split XCB common flags 2012-07-23 00:12:55 +02:00
Quentin Glidic
5e0cd52f10 common.mk: Split XCB keyboard flags 2012-07-23 00:06:37 +02:00
Quentin Glidic
51a0f312f2 common.mk: Split WM XCB flags 2012-07-23 00:04:01 +02:00
Quentin Glidic
fde8c0dd85 common.mk: Split Xlib flags 2012-07-23 00:04:01 +02:00
Quentin Glidic
5cf3751482 common.mk: Move -lm to i3_LIBS 2012-07-22 23:53:51 +02:00
Quentin Glidic
60bc6b0400 common.mk: Split Xcursor flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
85b261c162 common.mk: Split yajl flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
30934ea316 common.mk: Split libev flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
79fc8462c0 common.mk: Split libpcre flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
e232c06885 common.mk: Split libstartup-notification flags 2012-07-22 23:53:51 +02:00
Quentin Glidic
c7029a5e21 common.mk: Introduce I3_*FLAGS
CPPFLGES, CFLAGS and LDFLAGS should be user variables
We now provide default flags but use I3_*FLAGS flags for our own needed
flags

Also reoder lib flags a bit
2012-07-22 23:53:49 +02:00
Quentin Glidic
3b1b72ecbb *.mk: Support passing specific CFLAGS/LIBS 2012-07-22 23:53:13 +02:00
Quentin Glidic
e3b9ffe381 Move libi3 to the new Makefile layout 2012-07-22 19:57:21 +02:00
Quentin Glidic
8853334bbe New Makefile layout, move i3 to it 2012-07-22 19:57:18 +02:00