# babel - News transport agent for STiK
#
# Makefile
#
# (c)1996 Mark Baker. Distributable under the terms of the GNU
#                     general public licence
#
# $Id: Makefile,v 1.5 1996/09/23 21:32:10 mnb20 Exp $

# cgcc = cross compiler to build TOS programs under unix
CC = cgcc

CFLAGS = -O2
LDFLAGS =

OBJS = main.o gem.o files.o socket.o group.o strings.o stik-interface.o

# Executable

babel.prg : $(OBJS)
	$(CC) $(LDFLAGS) -o babel.prg $(OBJS) -lgem

# Object files

main.o :    main.c     babel.h babelstr.h
gem.o :     gem.c      babel.h babelstr.h
files.o :   files.c    babel.h babelstr.h
socket.o :  socket.c   babel.h babelstr.h
group.o :   group.c    babel.h babelstr.h
strings.o : strings.c  babelstr.h

# This one is done separately as it must be short ints
stik-interface.o : stik-interface.c babel.h
	$(CC) $(CFLAGS) -mshort -c stik-interface.c

# Other make targets

clean :
	rm *.o babel.prg

active.txt : active.5
	groff -man -Tascii -P-b -P-u active.5 >active.txt

babel.zip : babel.prg active.txt
	zip -r babel.zip README INSTALL babel.prg Makefile active.txt \
	active.5 *.c *.h include
