#	asys makefile   WARNING: distclean rm *.c files!
#
SHELL = /bin/sh
srcdir = src
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
CC = gcc -xc++ -g -O0 -I. -finline-functions
LIBS =
LD = gcc
L = lib/
S = $(srcdir)/
O = o/
C = $(CC) $? -c -o $@
BINDIR = /gnos/
RM = rm -f
RPCGEN = rpcgen
.SUFFIXES: .g
.x.o:
	$(RPCGEN) $<
.g.o:
	$(CC) -c $<
VPATH = ../src

OBJS =	cmds.o a_mua.o aglier.o parse822.o millie.o internet.o usenet.o \
		cnews_drv.o localize.o a_stdio.o aspawn.o
EXES =	gnos rcc #aglier
####

all:	$(EXES) defs

rcc:	rcc.o localize.o a_stdio.o
	$(LD) -o rcc rcc.o localize.o a_stdio.o

gnos:	$(OBJS)
	$(LD) -o gnos $(OBJS)

aglier: millie_m.o localize.o a_stdio.o
	$(LD) -o aglier millie_m.o localize.o a_stdio.o

millie_m.o:	millie.g
	$(CC) -c -DSTANDALONE -o millie_m.o millie.g
	
defs:	gnos_c.def gnos_rus.def

gnos_c.def:	rcc gnos.rc gnos_c.rc
	cat gnos.rc gnos_c.rc|./rcc > gnos_c.def # "C" locale

gnos_rus.def:	rcc gnos.rc gnos_rus.rc
	cat gnos.rc gnos_rus.rc|./rcc>gnos_rus.def # "ISO-8859-5" locale

install:
	-mkdir -p $(BINDIR)
	-mv $(BINDIR)gnos $(BINDIR)gnos.old
	cp gnos $(BINDIR)
	cp *def $(BINDIR)

uninstall:
	$(RM) $(BINDIR)gnos

mostlyclean:	
	$(RM) core *.o *.def $(EXES)

clean:	mostlyclean
	$(RM) *.def

realclean:	clean
	$(RM) *~ *.bak *.def
	$(RM) *.c

distclean:	realclean

TAGS:

info:

dist:

check:

strip:	all
	strip asys

$(D)anew.o:	$(L)anew.g

check:
	cat gnos.rc gnos_c.rc|less

# DO NOT DELETE THIS LINE -- make depend depends on it.
