#
# GNUmakefile
#
# Author: Tomi Ollila <too@cs.hut.fi>
#
#	Copyright (c) 1993 Tomi Ollila
#	    All rights reserved
#
# Created: Tue Sep 14 14:11:54 1993 too
# Last modified: Tue Apr  5 19:53:04 1994 too
#
# $Id: Makefile,v 3.4 1994/04/05 16:53:22 too Exp $
#

PRG=	inet-handler

CC=	gcc
CFLAGS= -O3 -Wall -Inetinclude: -I.
#CFLAGS=  -O3 -Wall -DDEBUG -Inetinclude: -I.
LFLAGS= -nostdlib -s

SRC=	handler.c applport.c cleanup.c args.c readargs.c interrupt.c c.c

OBJ=	$(SRC:.c=.o)

all:	$(PRG)

.c.o:
	$(CC) $(CFLAGS) -o $@ -c $<
#	$(CC) $(CFLAGS) $<


inet-handler.o: inet-handler.c
	$(CC) -O3 -o $@ -D__AMIGADATE__='"$(shell amigadate)"' -c inet-handler.c
#	$(CC) -S inet-handler.c

handler.E: handler.c
	$(CC) -E $(CFLAGS) -o handler.E -c handler.c

interrupt.s: interrupt.c
	$(CC) -v -S $(CFLAGS) -o interrupt.s -c interrupt.c

$(PRG): $(OBJ) inet-handler.o
	$(CC) $(LFLAGS)  -o $@ inet-handler.o $(OBJ)

FRC:

# 

handler.o:	handler/begin.c handler/startup.c handler/pendingwrites.c \
		handler/readevent.c handler/applmsg.c handler/timermsg.c \
		handler/mymsg.c handler/cleanup.c
