#
# 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: Mon Nov 15 23:46:19 1993 too
#
# $Id: Makefile,v 1.2 1993/11/17 12:06:50 too Exp $
#

PRG=	inet-handler

#inet-handler version
VERSION=	1


CC=	gcc
PR=	bumprev
CFLAGS= -O3 -Wall -I../amitcp-2.0/netinclude -I.
#CFLAGS=  -O3 -Wall -DDEBUG -I../amitcp-2.0/netinclude -I.
LFLAGS= -nostdlib

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) $<

# create new revision file just before linking
#inet-handler.o: $(OBJ)
inet-handler.o: inet-handler.c inet-handler.h
#	bumprev $(VERSION) $(PRG)
	$(CC) -O3 -o $@ -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) -nostdlib -o $@ inet-handler.o $(OBJ)

# 

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
