# Copyright (C) 1991,1992,1993 NEC Corporation.
#
# $Id: Makefile,v 2.20 1994/04/19 10:35:38 uchida Exp $ (NEC)
#
#	Makefile for plain2 1993 by A.Uchida 
#
#
BINDIR=c:/usr/local/bin
LIBDIR=c:/usr/local/share/plain2

SHELL=sh
MAKE=make
YDEFS = -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_OBSOLETE_NO_DEPRECATE -D_SECURE_SCL=0

DEFINES=-DKANJI -DPICTURE -DHTML -DWIN32 $(YDEFS)

CC=cl
CFLAGS= -nologo -W3 -Od -MD ${DEFINES}
DEBUG=

#CFLAGS= -nologo -W3 -Od -Zi -MD ${DEFINES}
#DEBUG=/DEBUG

SRCS=plain2.c readfile.c analyze.c miscutil.c \
	section.c example.c list.c plaintxt.c table.c spacing.c \
	headfoot.c hint.c picture.c justify.c ftitle.c \
	roffout.c texout.c title.c output.c renumout.c macro.c htmlout.c \
	getopt.c
OBJS_NOKANJI=plain2.obj readfile.obj miscutil.obj \
	section.obj example.obj list.obj plaintxt.obj spacing.obj \
	headfoot.obj hint.obj justify.obj \
	texout.obj output.obj renumout.obj macro.obj \
	htmlout.obj getopt.obj 
#
# Following files contain Kanji characters(8bit) in EUC code.
#
OBJS_KANJI=roffout.obj analyze.obj table.obj title.obj picture.obj ftitle.obj

HDRS=plain2.h table.h picture.h kanji.h
LIBS=
LDFLAGS=

plain2.exe: ${OBJS_NOKANJI} ${OBJS_KANJI}
	${CC} ${CFLAGS} ${LDFLAGS} -Feplain2.exe ${OBJS_NOKANJI} ${OBJS_KANJI} ${LIBES} -link $(DEBUG)

lint:
	lint ${DEFINES} ${SRCS} > error.LINT 2>&1 

TAGS: ${SRCS}
	etags ${SRCS}

install: plain2.exe
	cp -p plain2.exe c:/usr/local/txdir/w32tex/bin/
	cp -p plain2.exe c:/usr/work/edrive/wk/dist/PLAIN2/bin/

clean:
	rm -f plain2.exe *.obj

wc:
	@cstep ${HDRS} ${SRCS}

#depend:
#	makemake -f Makefile  ${HDRS} ${SRCS}

asccvt.exe: asccvt.c
	cl -Feasccvt.exe asccvt.c

${OBJS_NOKANJI}:

${OBJS_KANJI}:

#${OBJS_KANJI}: asccvt
#	asccvt < $< > x.c
#	cc -c ${CFLAGS} x.c
#	@rm -f x.c
#	mv x.obj $@

.SUFFIXES: .c .obj .h

# DO NOT DELETE THIS LINE -- makemake depend uses it

plain2.obj: plain2.h macro.h
readfile.obj: plain2.h kanji.h
analyze.obj: plain2.h picture.h kanji.h
miscutil.obj: plain2.h kanji.h
section.obj: plain2.h macro.h
example.obj: plain2.h
list.obj: plain2.h
plaintxt.obj: plain2.h
table.obj: plain2.h table.h kanji.h
spacing.obj: plain2.h
headfoot.obj: plain2.h
hint.obj: plain2.h
picture.obj: plain2.h kanji.h picture.h
justify.obj: plain2.h
ftitle.obj: plain2.h
roffout.obj: plain2.h picture.h table.h macro.h
texout.obj: plain2.h picture.h table.h macro.h
title.obj: plain2.h
output.obj: plain2.h picture.h macro.h
renumout.obj: plain2.h
macro.obj: plain2.h macro.h
htmlout.obj: plain2.h macro.h
getopt.obj: getopt.c getopt.h
