summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-14 20:15:03 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-14 20:25:56 +0100
commit172e09874fdecaeadf131a98ab597578770930af (patch)
tree122dee15733c6fa6904e7c907be64758a787cf61 /Makefile
parent512daa03c2e79352c2a40e6eb61b9604d7eb1f7a (diff)
downloadcv-172e09874fdecaeadf131a98ab597578770930af.tar.gz
cv-172e09874fdecaeadf131a98ab597578770930af.tar.bz2
cv-172e09874fdecaeadf131a98ab597578770930af.zip
Makefile: Pass N_THREADS define as number of cpus
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4a6b4bf..2058de0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
CC = gcc
-CFLAGS = -ggdb -std=c99 -pedantic -Wall `pkg-config --cflags gtk+-2.0 glib-2.0`
-LDFLAGS = `pkg-config --libs gtk+-2.0 glib-2.0` -lm
+CFLAGS = -ggdb -std=c99 -pedantic -Wall \
+ $(shell pkg-config --cflags gtk+-2.0 glib-2.0) \
+ -DN_THREADS=$(shell grep -c ^processor /proc/cpuinfo)
+LDFLAGS = -lm \
+ $(shell pkg-config --libs gtk+-2.0 glib-2.0)
PROGS = wimmel wimmel_gl
OBJS = wimmel.o wimmel_gl.o util.o