From: Carl Worth <cworth@cworth.org>
Date: Tue, 20 Aug 2013 23:11:31 +0000 (-0700)
Subject: Makefile: Fix to enable compiler warnings
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=d0e9eca8b3dcf245e2f563a3f5f71290bee78254;p=glaze

Makefile: Fix to enable compiler warnings

The configure script was carefully detecting available warning options, but
the Makefile was neglecting to actually use them when compiling.

Fix so that we get useful warning messages.
---

diff --git a/Makefile b/Makefile
index 069192a..0246543 100644
--- a/Makefile
+++ b/Makefile
@@ -28,16 +28,18 @@ TARGETS = $(LIBGLAZE_LIBNAME) lib64/libGL.so.1 lib32/libGL.so.1
 
 all: $(TARGETS)
 
+GLAZE_CFLAGS = $(CFLAGS) $(WARN_CFLAGS)
+
 $(LIBGLAZE_LIBNAME): glaze.c
-	$(CC) $(CFLAGS) -fPIC -shared -Wl,-Bsymbolic,-soname=$(LIBGLAZE_SONAME) -o $@ $<
+	$(CC) $(GLAZE_CFLAGS) -fPIC -shared -Wl,-Bsymbolic,-soname=$(LIBGLAZE_SONAME) -ldl -o $@ $<
 
 lib64/libGL.so.1: glaze-gl.c glapi.def
 	mkdir -p lib64
-	$(CC) $(CFLAGS) -m64 -fPIC -shared -Wl,-Bsymbolic -o $@ $<
+	$(CC) $(GLAZE_CFLAGS) -m64 -fPIC -shared -Wl,-Bsymbolic -o $@ $<
 
 lib32/libGL.so.1: glaze-gl.c specs/gl.def
 	mkdir -p lib32
-	$(CC) $(CFLAGS) -m32 -fPIC -shared -Wl,-Bsymbolic -o $@ $<
+	$(CC) $(GLAZE_CFLAGS) -m32 -fPIC -shared -Wl,-Bsymbolic -o $@ $<
 
 .PHONY: install
 install: all