Files
mercury/extras/graphics/samples/maze/Mmakefile.MacOSX
Julien Fischer 03c441fa8a Update programming style in OpenGL maze example.
Fix Makefiles for OpenGL examples on macOS.

extras/graphics/samples/maze.m:
extras/graphics/samples/globals.m:
    Update programming style.

    Replace tabs with spaces.

extras/graphics/samples/gears/Mmakefile.MacOSX:
extras/graphics/samples/maze/Mmakefile.MacOSX:
    Set header includes for the C compiler.

    Add a "run" target that sets DYLD_LIBRARY_PATH appropriately
    for running the examples in situ.
2022-01-23 14:49:50 +11:00

35 lines
1.1 KiB
Plaintext

# This Mmakefile is for building the gears example on MacOS 10.3 and
# 10.4. To build the examples in place, ie. without having installed
# the GLUT and OpenGL bindings, set the environment variable
# DYLD_LIBRARY_PATH to point to paths where the bindings were built.
# e.g.
#
# export DYLD_LIBRARY_PATH=../../mercury_glut:../../mercury_opengl
MAIN_TARGET = maze
# Specify the location of the `mercury_opengl' and `mercury_glut'
# packages.
MERCURY_OPENGL_DIR = ../../mercury_opengl
MERCURY_GLUT_DIR = ../../mercury_glut
CFLAGS = -I$(MERCURY_OPENGL_DIR) -I$(MERCURY_GLUT_DIR)
VPATH = $(MERCURY_OPENGL_DIR):$(MERCURY_GLUT_DIR):$(MMAKE_VPATH)
MCFLAGS = -I$(MERCURY_OPENGL_DIR) -I$(MERCURY_GLUT_DIR) \
$(EXTRA_MCFLAGS)
MLFLAGS = -R$(MERCURY_OPENGL_DIR) -R$(MERCURY_GLUT_DIR) \
-L$(MERCURY_OPENGL_DIR) -L$(MERCURY_GLUT_DIR) $(EXTRA_MLFLAGS)
MLLIBS += -lobjC -lmercury_glut -lmercury_opengl -framework GLUT -framework OpenGL
C2INITARGS = $(MERCURY_OPENGL_DIR)/mercury_opengl.init \
$(MERCURY_GLUT_DIR)/mercury_glut.init
depend: maze.depend
.PHONY: run
run: maze
DYLD_LIBRARY_PATH=$(MERCURY_GLUT_DIR):$(MERCURY_OPENGL_DIR) ./maze