#
#PURPOSE: The purpose of this file is to make nfbtrans, the braille
#translation software written by the National Federation of the Blind
#compile under the Unix operating system.
#
#The source and object files are as follows:

SRCFILES=nfbtrans.c nfbpatch.c
OBJFILES=nfbtrans.o nfbpatch.o
LIBS= -ltermcap

#Compiler and linking flags are as follows:
CFLAGS="-O"
CC=gcc
LDFLAGS=-Bdynamic

default:
	@echo "type one of the following"
	@echo
	@echo "sunos"
	@echo "sunos-insight"
	@echo "ultrix"
	@echo "aix"
	@echo "linux"
all: nfbtrans

#Lint can wait a while

nfbtrans: $(OBJFILES)
	$(CC) $(CFLAGS) $(OBJFILES) $(LIBS) -o nfbtrans

ultrix:
	$(MAKE) CFLAGS=-O

linux:
	$(MAKE) all CFLAGS="-O -Dlinux"

sunos:
	$(MAKE) all CFLAGS="-O -Dsunos"

insight:
	insight -fno-builtin -fwritable-strings \
	$(CFLAGS) $(OBJFILES) $(LIBS) -o nfbtrans

aix:
	$(MAKE) all CC=cc CFLAGS="-o -Dunix -Daix"

clean:
	rm -f $(OBJFILES) nfbtrans

