From 9b0cbcc81e2c474bb4d856ec6f2a74258b59129c Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Fri, 12 Sep 2014 16:16:37 -0700 Subject: [PATCH] Fix loose ends in build support. 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 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b679e99..bcc2629 100644 --- 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) -- 2.43.0