# Makefile for l2a  1997 July 16 [gh]
#-----------------------------------------------------------------------------
# Abstract:
#    Filter to detexify texts (handles both tex and latex).
#
# Design:
#    This Makefile will work with Unix standard make, with Borland's make,
#    and Microsoft's nmake (it won't work with Microsoft's make).
#
#    To make l2a on a particular platform, set/remove comments in the
#    "customization section" below.  Also, edit the directories etc. so that
#    things install in the right places.
#
#    Also, to make things compile, you may need to convert the source files
#    to use the appropriate end of line delimter for whatever operating
#    system you are trying to compile on.
#
# Portability:
#    Tested using SunOS 3.5.1 (using default cc) and W/NT (using MS C++ 4.1).
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#                        START OF CUSTOMIZATION SECTION
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

#---( Compiler )-----------

# Microsoft C (32 bit C++ 4.1)
CC	= cl

# K&R cc
#CC	= cc

#---( Operating system )---

# MS-DOS / WINNT shell
OBJ	= l2a.obj yywrap.obj
EXE	= l2a.exe
LLL	=

# UNIX
#OBJ	= l2a.o
#EXE	= l2a
#LLL	= -ll

#---( Files, directories, etc.)---

SRC	= l2a.tex Makefile l2a.l l2a.1 l2a.c yywrap.c file_id.diz manifest.txt
BINDIR	= /local/bin
MANDIR	= /local/man

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                         END OF  CUSTOMIZATION SECTION
#-----------------------------------------------------------------------------


#---( compilations )----------------------------------------------------------

all:	$(OBJ)
	$(CC) -o l2a $(OBJ) $(LLL)


#---( objects )---------------------------------------------------------------

l2a.o:	l2a.l


#---( housekeeping )----------------------------------------------------------

install:
	cp $(EXE) $(BINDIR)/$(EXE)
	cp l2a.1 $(MANDIR)/man1/l2a.1

tidy:
	rm -f $(OBJ) $(EXE) l2a.zip l2a.txt lex.yy.c l2a.aux l2a.log fn.tmp

clean:
	rm -f $(OBJ) $(EXE) l2a.zip l2a.txt lex.yy.c l2a.aux l2a.log fn.tmp l2a.c

test:
	@echo "It is supposed to output an _Unrecognized markup command_ diagnostic."
	l2a < l2a.tex > l2a.txt
	@echo "The result of the test is on a file named \"l2a.txt\"

dvi:
	latex l2a.tex

zipdist: $(SRC) $(EXE)
	zip l2a.zip $(SRC) $(EXE)
	unzip -v l2a.zip

zipsrc: $(SRC)
	zip l2asrc.zip $(SRC)
	unzip -v l2asrc.zip

# EOF
