mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 11:54:02 +00:00
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.
35 lines
1.1 KiB
Plaintext
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 the paths where the bindings were built.
|
|
# e.g.
|
|
#
|
|
# export DYLD_LIBRARY_PATH=../../mercury_glut:../../mercury_opengl
|
|
|
|
MAIN_TARGET = gears
|
|
|
|
# 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: gears.depend
|
|
|
|
.PHONY: run
|
|
run:
|
|
DYLD_LIBRARY_PATH=$(MERCURY_GLUT_DIR):$(MERCURY_OPENGL_DIR) ./gears
|