# Makefile for a library for handling SJIS characters in C.
# Patterned more or less after the standard ctype library.
# Does not use C's wide or multibyte characters.
# See <http://reiisi.homedns.org/~joel/sannet/sjctype/testproj.html>,
# a copy of which should be in this archive.
# Written by Joel Matthew Rees
# Copyright 2013, Joel Matthew Rees
# Distribution and use permitted under several licenses, see the in-file comments.
# See LICENSE.TXT for the GPL conditions if you don't like the original license.
# GPL also available at <http://www.gnu.org/licenses/>. 


# Keeping things relatively simple for now.
# Use "sjc"thing, to keep the namespace clean.

CFLAGS = -Wall

sjcobjects = slowsjctype.o sjisctypetest.o showch16.o showch8.o port.o hiragana-crypt.o

sjcexecutables = sjisctypetest showch16 showch8 hiragana-crypt sjhexdump


all: slowsjctype.o $(sjcexecutables)

# The example:
hiragana-crypt: hiragana-crypt.o slowsjctype.o

# The library:
slowsjctype.o: slowsjctype.h sj16bitChars.h sj8bitChars.h sjctypenv.h

# The test file (by calibrated eyeball):
sjisctypetest: sjisctypetest.o port.o slowsjctype.o sj16bitChars.h sj8bitChars.h sjctypenv.h

# A helper:
showch16: showch16.o port.o sj16bitChars.h sjctypenv.h

# Another helper
showch8: showch8.o port.o

# For making working on the old (classic, pre-Mac OS X) Macintosh livable:
port.o: port.h

sjhexdump: sjhexdump.c slowsjctype.o

.PHCLEAN: sjcclean
sjcclean: 
	-rm $(sjcobjects) $(sjcexecutables)

