Add -lm to Makefile in 1998/banks
Some systems need it to link in libm. Fedora comes to mind as an example; macOS has no problem with it though running this entry under macOS is another matter entirely.
This commit is contained in:
1 parent
31ee47176c
commit
a31ef00105
2 files changed
+26
-26
No files matched your search
+1
-1
@@ -128,7 +128,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
|||||||
#
|
#
|
||||||
#LIBS=
|
#LIBS=
|
||||||
#LIBS= -lm
|
#LIBS= -lm
|
||||||
LIBS= -L ${X11_LIBDIR} -lX11
|
LIBS= -L ${X11_LIBDIR} -lX11 -lm
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# C compiler to use
|
# C compiler to use
|
||||||
|
|||||||
+25
-25
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
cat horizon.sc pittsburgh.sc | ./banks
|
cat horizon.sc pittsburgh.sc | ./banks
|
||||||
|
|
||||||
## Judges' comments
|
## Judges' comments:
|
||||||
|
|
||||||
What can we say? It's a flight sim done in 1536 bytes of real code.
|
What can we say? It's a flight sim done in 1536 bytes of real code.
|
||||||
This one is a real marvel. When people say the size limits are too
|
This one is a real marvel. When people say the size limits are too
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
The provided Makefile should work; you will need an X-ish system, and
|
The provided Makefile should work; you will need an X-ish system, and
|
||||||
a select() system call. More on building in the author comments.
|
a select() system call. More on building in the author comments.
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments:
|
||||||
|
|
||||||
You have just stepped out of the real world and into the
|
You have just stepped out of the real world and into the
|
||||||
virtual. You are now sitting in the cockpit of a Piper Cherokee
|
virtual. You are now sitting in the cockpit of a Piper Cherokee
|
||||||
@@ -51,30 +51,26 @@
|
|||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* Simulator models a Piper Cherokee, which is a light,
|
* Simulator models a Piper Cherokee, which is a light, single-engine propeller
|
||||||
single-engine propeller driven airplane.
|
driven airplane.
|
||||||
|
|
||||||
* The airplane is modeled as a six degree-of-freedom rigid
|
* The airplane is modeled as a six degree-of-freedom rigid body, accurately
|
||||||
body, accurately reflecting its dynamics (for normal flight
|
reflecting its dynamics (for normal flight conditions, at least).
|
||||||
conditions, at least).
|
|
||||||
|
|
||||||
* Fly through a virtual 3-D world, while sitting at your X
|
* Fly through a virtual 3-D world, while sitting at your X console.
|
||||||
console.
|
|
||||||
|
|
||||||
* Loadable scenery files.
|
* Loadable scenery files.
|
||||||
|
|
||||||
* Head-up display contains three instruments: a true airspeed
|
* Head-up display contains three instruments: a true airspeed indicator, a
|
||||||
indicator, a heading indicator (compass), and an altimeter.
|
heading indicator (compass), and an altimeter.
|
||||||
|
|
||||||
* Flight controls may be mapped to any keys at compile time
|
* Flight controls may be mapped to any keys at compile time by redefining the
|
||||||
by redefining the macros in the build file. Nice if your
|
macros in the build file. Nice if your keyboard doesn't have arrow keys. (Or
|
||||||
keyboard doesn't have arrow keys. (Or if you still use
|
if you still use vi. :-)
|
||||||
vi. :-)
|
|
||||||
|
|
||||||
* Time step size can be set at compile time. This is useful to
|
* Time step size can be set at compile time. This is useful to reduce flicker
|
||||||
reduce flicker on network X connections. (But be careful:
|
on network X connections. (But be careful: step sizes longer than about 0.03
|
||||||
step sizes longer than about 0.03 seconds tend to have
|
seconds tend to have numerical stability problems.)
|
||||||
numerical stability problems.)
|
|
||||||
|
|
||||||
* Airplane never stalls!
|
* Airplane never stalls!
|
||||||
|
|
||||||
@@ -89,7 +85,7 @@
|
|||||||
Scenery
|
Scenery
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Each of the *.sc files is a scenery file. The simulator
|
Each of the `*.sc` files is a scenery file. The simulator
|
||||||
program reads in the scenery from standard input on startup.
|
program reads in the scenery from standard input on startup.
|
||||||
You may input more than one scenery file, as long as there are
|
You may input more than one scenery file, as long as there are
|
||||||
less than 1000 total lines of input.
|
less than 1000 total lines of input.
|
||||||
@@ -113,16 +109,20 @@
|
|||||||
|
|
||||||
river.sc -- Follow a flowing river from the sky.
|
river.sc -- Follow a flowing river from the sky.
|
||||||
|
|
||||||
|
|
||||||
A few examples of how to input scenery:
|
A few examples of how to input scenery:
|
||||||
|
|
||||||
|
|
||||||
cat horizon.sc pittsburgh.sc | ./banks
|
cat horizon.sc pittsburgh.sc | ./banks
|
||||||
cat mountains.sc bb.sc | ./banks
|
cat mountains.sc bb.sc | ./banks
|
||||||
cat mountains.sc river.sc pyramids.sc | ./banks
|
cat mountains.sc river.sc pyramids.sc | ./banks
|
||||||
|
|
||||||
You can simulate flying through a cloud bank as well:
|
You can simulate flying through a cloud bank as well:
|
||||||
|
|
||||||
|
|
||||||
./banks < /dev/null
|
./banks < /dev/null
|
||||||
|
|
||||||
|
|
||||||
You will usually want at least a horizon, though.
|
You will usually want at least a horizon, though.
|
||||||
|
|
||||||
The format of scenery files is simple, by the way. They're just
|
The format of scenery files is simple, by the way. They're just
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
different options.
|
different options.
|
||||||
|
|
||||||
To map a key to a control, you must pass an option to the
|
To map a key to a control, you must pass an option to the
|
||||||
compiler in the format ``-Dcontrol=key''. The possible controls
|
compiler in the format `-Dcontrol=key`. The possible controls
|
||||||
you can map are described in the table below:
|
you can map are described in the table below:
|
||||||
|
|
||||||
|
|
||||||
@@ -161,18 +161,18 @@
|
|||||||
|
|
||||||
|
|
||||||
Values for the possible keys can be found in the X Windows
|
Values for the possible keys can be found in the X Windows
|
||||||
header file <X11/keysym.h>. This file is most likely a
|
header file `<X11/keysym.h>`. This file is most likely a
|
||||||
cross-reference to another header, <X11/keysymdef.h>.
|
cross-reference to another header, `<X11/keysymdef.h>`.
|
||||||
|
|
||||||
You must map all seven controls to keys at compile time, or the
|
You must map all seven controls to keys at compile time, or the
|
||||||
compilation will fail.
|
compilation will fail.
|
||||||
|
|
||||||
For example, to map Center Stick to the space-bar, the compile
|
For example, to map Center Stick to the space-bar, the compile
|
||||||
option would be ``-DCS=XK_space''.
|
option would be `-DCS=XK_space`.
|
||||||
|
|
||||||
|
|
||||||
To set the time step size, you must pass the following option to
|
To set the time step size, you must pass the following option to
|
||||||
the compiler: ``-Ddt=duration'', where dt is literal, and where
|
the compiler: `-Ddt=duration`, where `dt` is literal, and where
|
||||||
duration is the time in seconds you want the time step to be.
|
duration is the time in seconds you want the time step to be.
|
||||||
|
|
||||||
Two things to keep in mind when selecting a time step. Time
|
Two things to keep in mind when selecting a time step. Time
|
||||||
|
|||||||
Reference in new issue
Block a user