nulib2/nufxlib/samples/Makefile.in

82 lines
2.3 KiB
Makefile
Raw Normal View History

2000-05-23 01:55:31 +00:00
#
2007-02-19 23:12:22 +00:00
# Copyright (C) 2000-2007 by Andy McFadden, All Rights Reserved.
# This is free software; you can redistribute it and/or modify it under the
2007-02-19 23:12:22 +00:00
# terms of the BSD, see the file COPYING.
#
2000-05-23 01:55:31 +00:00
# Makefile for nufxlib tests (should work with non-GNU make).
#
# This is normally invoked from the nufxlib makefile.
#
# If you invoke this directly, LIB_PRODUCT won't be defined, and it
# won't automatically detect changes to the library. However, any
# changes to the library should cause a re-build in here anyway if
# you're running "make" from the library directory.
#
SHELL = /bin/sh
CC = @CC@
AR = ar rcv
#OPT = @CFLAGS@ -DNDEBUG
OPT = @CFLAGS@
#OPT = @CFLAGS@ -DDEBUG_MSGS
#OPT = @CFLAGS@ -DDEBUG_VERBOSE
GCC_FLAGS = -Wall -Wwrite-strings -Wstrict-prototypes -Wpointer-arith -Wshadow
CFLAGS = @BUILD_FLAGS@ -I. -I.. @DEFS@
#ALL_SRCS = $(wildcard *.c *.cpp)
2003-02-23 23:46:47 +00:00
ALL_SRCS = Exerciser.c ImgConv.c Launder.c TestBasic.c \
TestExtract.c TestSimple.c TestTwirl.c
2000-05-23 01:55:31 +00:00
NUFXLIB = -L.. -lnufx
2000-05-23 01:55:31 +00:00
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.
2014-12-24 19:14:32 +00:00
PRODUCTS = exerciser imgconv launder test-basic test-extract test-names \
test-simple test-twirl
2000-05-23 01:55:31 +00:00
all: $(PRODUCTS)
@true
exerciser: Exerciser.o $(LIB_PRODUCT)
$(CC) -o $@ Exerciser.o $(NUFXLIB) @LIBS@
2000-05-23 01:55:31 +00:00
imgconv: ImgConv.o $(LIB_PRODUCT)
$(CC) -o $@ ImgConv.o $(NUFXLIB) @LIBS@
2000-05-23 01:55:31 +00:00
launder: Launder.o $(LIB_PRODUCT)
$(CC) -o $@ Launder.o $(NUFXLIB) @LIBS@
2000-05-23 01:55:31 +00:00
test-basic: TestBasic.o $(LIB_PRODUCT)
$(CC) -o $@ TestBasic.o $(NUFXLIB) @LIBS@
2000-05-23 01:55:31 +00:00
test-extract: TestExtract.o $(LIB_PRODUCT)
$(CC) -o $@ TestExtract.o $(NUFXLIB) @LIBS@
2000-05-23 01:55:31 +00:00
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.
2014-12-24 19:14:32 +00:00
test-names: TestNames.o $(LIB_PRODUCT)
$(CC) -o $@ TestNames.o $(NUFXLIB) @LIBS@
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.
2014-12-24 19:14:32 +00:00
test-simple: TestSimple.o $(LIB_PRODUCT)
$(CC) -o $@ TestSimple.o $(NUFXLIB) @LIBS@
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.
2014-12-24 19:14:32 +00:00
2003-02-23 23:46:47 +00:00
test-twirl: TestTwirl.o $(LIB_PRODUCT)
$(CC) -o $@ TestTwirl.o $(NUFXLIB) @LIBS@
2003-02-23 23:46:47 +00:00
2000-05-23 01:55:31 +00:00
tags::
ctags --totals -R ../*
@#ctags *.cpp ../*.c *.h ../*.h
clean:
-rm -f *.o core
-rm -f $(PRODUCTS)
distclean: clean
-rm -f tags
-rm -f Makefile Makefile.bak
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.
2014-12-24 19:14:32 +00:00
COMMON_HDRS = ../NufxLibPriv.h ../NufxLib.h ../MiscStuff.h ../SysDefs.h
Exerciser.o: Exerciser.c $(COMMON_HDRS)
ImgConv.o: ImgConv.c $(COMMON_HDRS)
Launder.o: Launder.c $(COMMON_HDRS)
TestBasic.o: TestBasic.c $(COMMON_HDRS)
TestExtract.o: TestExtract.c $(COMMON_HDRS)
TestNames.o: TestNames.c $(COMMON_HDRS)
TestSimple.o: TestSimple.c $(COMMON_HDRS)
TestTwirl.o: TestTwirl.c $(COMMON_HDRS)