]> git.cworth.org Git - glaze/commitdiff
Fix loose ends in build support.
authorMark Janes <mark.a.janes@intel.com>
Fri, 12 Sep 2014 23:16:37 +0000 (16:16 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 18 Dec 2014 15:02:51 +0000 (07:02 -0800)
Add the following items to the glaze Makefile:

 * Clean up libglaze.so in clean target

 * Add dependency to rebuild libGL.so.1 if any of the .def files have
   been changed.

 * Add a distclean target.

 * Add a check-syntax target to allow emacs flymake.

Makefile

index b679e99116b42b9a4ccbba5e8718bd4ebd6a4875..bcc26295946192a9e20e339fe20e703793580fe7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,9 @@ LIBGLAZE_32_LINKER_NAME = libglaze-32.so
 LIBGLAZE_32_SONAME = $(LIBGLAZE_32_LINKER_NAME).$(MAJOR)
 LIBGLAZE_32_LIBNAME = $(LIBGLAZE_32_SONAME).$(MINOR).$(RELEASE)
 
-TARGETS = glaze
+TARGETS = glaze $(LIBGLAZE_LINKER_NAME)
+
+SPECS = specs/gl.def specs/glx.def
 
 ifeq ($(COMPILER_SUPPORTS_32),Yes)
 TARGETS += $(LIBGLAZE_32_LIBNAME)
@@ -58,11 +60,11 @@ $(LIBGLAZE_LIBNAME): libglaze.c
 $(LIBGLAZE_LINKER_NAME): $(LIBGLAZE_LIBNAME)
        ln -sf $(LIBGLAZE_LIBNAME) $@
 
-$(LIB64_DIR)/libGL.so.1: glaze-gl.c
+$(LIB64_DIR)/libGL.so.1: glaze-gl.c $(SPECS)
        mkdir -p $(LIB64_DIR)
        $(CC) $(GLAZE_CFLAGS) -DGLAZE_BITS=64 -m64 -fPIC -shared -Wl,-Bsymbolic -o $@ $<
 
-$(LIB32_DIR)/libGL.so.1: glaze-gl.c specs/gl.def
+$(LIB32_DIR)/libGL.so.1: glaze-gl.c $(SPECS)
        mkdir -p $(LIB32_DIR)
        $(CC) $(GLAZE_CFLAGS) -DGLAZE_BITS=32 -m32 -fPIC -shared -Wl,-Bsymbolic -o $@ $<
 
@@ -102,3 +104,10 @@ endif
 
 clean:
        rm -f $(TARGETS)
+
+distclean: clean
+       rm Makefile.config glaze.pc glaze-32.pc config.h
+
+.PHONY: check-syntax
+check-syntax:
+       $(CC) $(CFLAGS) -Wall -Wextra -fsyntax-only $(CHK_SOURCES)