shithub: npe

ref: bab90b31049f285144fa4cada3c9985b7e1d7b65
dir: /README.md/

View raw version
# npe

"Native Porting Environment" for 9front, pronounced "nope".

*WIP*

The project tries to provide a minimalistic (and mostly
non-conformant) POSIX environment with several additional libraries
(cut-down version of SDL2 from scratch for now) to ease up porting of
software to 9front.  The goal is to be able to build and run
non-native GUI software with very minimal changes, if any.

Unlike APE, NPE is fully native and is not trying to hide any of the
native Plan 9 APIs.

## Using NPE

Clone, run `mk install`.

Create a `mkfile` for the software to be built, and set `CFLAGS`:

	CFLAGS=$CFLAGS -p -I/sys/include/npe -D__plan9__ -D__${objtype}__

By default npe will override the `main` function with its own
`threadmain`.  If that behaviour isn't desired, add
`-D__plan9_keep_main__` to `CFLAGS`.

Stack size is set to 256k.

With SDL applications Alt+F4 is used to send `SDL_QUIT` event.

[General porting guide](http://docs.9front.org/porting).