diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-04 17:53:57 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-04 17:53:57 +0200 |
commit | 040a45bba01edb885faddac75025f88e655b89be (patch) | |
tree | 0493bdbfe72b3a7d71e201ffe1740a1ef737b467 | |
parent | f829f179582f7cb03c87a67b67e54a09c624bb13 (diff) | |
download | cv-040a45bba01edb885faddac75025f88e655b89be.tar.gz cv-040a45bba01edb885faddac75025f88e655b89be.tar.bz2 cv-040a45bba01edb885faddac75025f88e655b89be.zip |
Makefile: Use -Wl,--as-needed
-rw-r--r-- | Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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) |