summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-04 17:53:57 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-04 17:53:57 +0200
commit040a45bba01edb885faddac75025f88e655b89be (patch)
tree0493bdbfe72b3a7d71e201ffe1740a1ef737b467
parentf829f179582f7cb03c87a67b67e54a09c624bb13 (diff)
downloadcv-040a45bba01edb885faddac75025f88e655b89be.tar.gz
cv-040a45bba01edb885faddac75025f88e655b89be.tar.bz2
cv-040a45bba01edb885faddac75025f88e655b89be.zip
Makefile: Use -Wl,--as-needed
-rw-r--r--Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 65c0cfe..64074dc 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ CC = gcc
CFLAGS = -ggdb -std=c99 -pedantic -Wall $(DEFINES) \
$(shell pkg-config --cflags gdk-pixbuf-2.0 glib-2.0 gthread-2.0) \
-DN_THREADS=$(shell grep -c ^processor /proc/cpuinfo || echo 2)
-LDFLAGS = $(LIBS) -lm \
+LDFLAGS = -Wl,--as-needed $(LIBS) -lm \
$(shell pkg-config --libs gdk-pixbuf-2.0 glib-2.0 gthread-2.0)
PROGS = wimmel wimmel_gl roi capture
@@ -18,24 +18,24 @@ capture: capture.o
.PHONY: clean all
%:
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+
+ $(CC) -o $@ $+ $(LDFLAGS)
%.o: %.c %.h
$(CC) $(CFLAGS) -c -o $@ $<
wimmel_gl:
- $(CC) $(LDFLAGS) `pkg-config --cflags --libs egl glesv2` -o $@ $+
+ $(CC) -o $@ $+ $(LDFLAGS) `pkg-config --cflags --libs egl glesv2`
roi.o: roi.c
- $(CC) $(CFLAGS) `pkg-config --cflags gtk+-3.0` -c -o $@ $<
+ $(CC) -c -o $@ $+ $(CFLAGS) `pkg-config --cflags gtk+-3.0`
roi:
- $(CC) $(LDFLAGS) `pkg-config --libs gtk+-3.0` -o $@ $+
+ $(CC) -o $@ $+ $(LDFLAGS) `pkg-config --libs gtk+-3.0`
capture.o: capture.c
- $(CC) $(CFLAGS) `pkg-config --cflags gtk+-3.0 opencv` -c -o $@ $<
+ $(CC) -c -o $@ $+ $(CFLAGS) `pkg-config --cflags gtk+-3.0 opencv`
capture:
- $(CC) $(LDFLAGS) `pkg-config --libs gtk+-3.0 opencv` -o $@ $+
+ $(CC) -o $@ $+ $(LDFLAGS) `pkg-config --libs gtk+-3.0 opencv`
clean:
rm -f $(PROGS) $(OBJS)