mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 13:23:47 +00:00
Separate out the details of how to link against ncurses and the panel library
into a separate file. Include this new file in both the top-level and samples
Mmakefiles and use the variables it defines to link against ncurses.
Document how to to use the ncursesN-config and pkg-config tools to find
the correct set of flags to link against ncurses. Using ncursesN-config
was suggested by Fabrice Nicol in a change he recently posted.
General cleanups.
extras/curs/Ncurses.options:
New file defining variables that control how to link against ncurses
and the panel library.
Document some ways of finding the correct set of flags.
Document how to override the contents of this file on the command line.
extras/curs/Mmakefile:
Include the Ncurses.options file.
Refer users to that file for controlling how to link against
ncurses.
extras/curs/samples/Mmakefile:
Import Ncurses.options instead of hardcoding the library flags here.
extras/curs/curs.m:
Shift vim modeline into our usual place.
Update copyright notice.
Point users to Ncurses.options.
extras/curs/samples/*.m:
Replace tabs with spaces.
Delete trailing whitespace.
Minor cleanups.
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
# vim: ts=8 sw=8 noexpandtab
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Copyright (C) 2001 Ralph Becket <rbeck@microsoft.com>
|
|
#
|
|
# THIS FILE IS HEREBY CONTRIBUTED TO THE MERCURY PROJECT TO
|
|
# BE RELEASED UNDER WHATEVER LICENCE IS DEEMED APPROPRIATE
|
|
# BY THE ADMINISTRATORS OF THE MERCURY PROJECT.
|
|
|
|
include ../Ncurses.options
|
|
|
|
# Specify the location of the `mypackage' and `myotherlib' directories
|
|
#
|
|
CURS_DIR = ..
|
|
|
|
DEMOS = demo nibbles frogger
|
|
|
|
depend: $(DEMOS:%=%.depend)
|
|
all: demos
|
|
clean: $(DEMOS:%=%.clean)
|
|
realclean: $(DEMOS:%=%.realclean)
|
|
demos: $(DEMOS)
|
|
|
|
# The following stuff tells Mmake to use the two libraries
|
|
VPATH = $(CURS_DIR):$(MMAKE_VPATH)
|
|
MCFLAGS = -I$(CURS_DIR) $(EXTRA_MCFLAGS)
|
|
CFLAGS = -I$(CURS_DIR)
|
|
MLFLAGS = -R$(CURS_DIR) $(EXTRA_MLFLAGS) -L$(CURS_DIR)
|
|
|
|
# You should check that the definitions of PANEL_LIBS and NCURSES_LIBS
|
|
# in ../Ncurses.options are correct for your system.
|
|
MLLIBS = -lcurs $(PANEL_LIBS) $(NCURSES_LIBS) $(EXTRA_MLLIBS)
|
|
C2INITARGS = $(CURS_DIR)/curs.init
|
|
|
|
MAIN_TARGET = all
|