Commit Graph

7 Commits

Author SHA1 Message Date
Kelvin Sherlock ae66fba7bc pkg-config support
will generate nufxlib.pc and install to the pkgconfig directory
for use with the oft-used pkg-config utility.
2020-10-14 23:18:02 -04:00
Stephen Kitt ea89644bfa
Ensure the library is built before the samples
When building in parallel, Make can start building the samples before
it’s finished building the library, which causes the build to fail.
Adding an explicit dependency ensures that the library is built before
the samples.

Signed-off-by: Stephen Kitt <steve@sk2.org>
2019-05-04 23:00:48 +02:00
Andy McFadden 9fdc77a108 Add -fPIC to CFLAGS
It's needed for "make shared".  Not needed (or desired) for static
libs, but it's nearly harmless.
2018-08-07 20:47:56 -07:00
Andy McFadden e2088e64d3 Distinguish Unicode and Mac OS Roman strings
NufxLib has historically made no effort to distinguish between
the character set used for filenames on the local disk, and for
filenames stored within the archive.  Now all Unicode filename
strings use the UNICHAR type and have "UNI" in the name, and all
Mac OS Roman strings have "MOR" in the name.  (The naming
convention makes it obvious when you're assigning the wrong thing;
on Linux both formats are char*, so the compiler won't tell you
if you get it wrong.)

The distinction is necessary because filesystems generally support
Unicode these days, but on Windows you need to use a separate
set of wide-character file I/O functions.  (On Linux it all works
with "narrow" strings, and the UTF-8 encoding is interpreted by
applications.)  The character set used for NuFX archive filenames
is MOR, matching what GS/OS + HFS supported, and we want to be able
to convert back and forth between MOR and a Unicode representation.

This change updates the various character types and string names,
adds conversion functions, and updates NuLib2 for proper execution
on Linux.  It does not include the (probably extensive) changes
required for Windows UTF-16 support.  Instead, the conversion
functions are no-ops, which should result in NuLib2 for Windows
continuing to behave in the same slightly broken way.

This adds "test-names", which exercises Unicode filenames a bit.
It will not pass on Win32.

Also, tweaked the Linux makefiles to have explicit dependencies,
rather than empty space and an expectation that "makedepend" exists.

Also, minor source code cleanups.

While this probably doesn't affect binary compatibility -- it's
mainly a matter of naming and string interpretation -- there's
enough going on that it should be considered an API revision, so
this updates the version to 3.0.0.
2015-01-02 17:14:34 -08:00
Andy McFadden cf433eeae0 Don't delete Version.c
We used to generate Version.c, so it was being removed by the
"distclean" target.
2014-12-21 10:18:26 -08:00
Andy McFadden d34f09ba8f Remove sed step from build. 2014-10-29 09:24:47 -07:00
Andy McFadden ec84cadfee Remove placeholder version number from directory name. 2014-10-28 10:27:31 -07:00