# 
#   Copyright (C) 1993, 1994 Free Software Foundation
#
#   This program is free software; you can redistribute it and/or
#   modify it under the terms of the GNU General Public License as
#   published by the Free Software Foundation; either version 2, or (at
#   your option) any later version.
#
#   This program is distributed in the hope that it will be useful, but
#   WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#   General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dir := term
makemode := server

SRCS=input.c output.c subr.c devio.c users.c main.c
OBJS=$(subst .c,.o,$(SRCS)) io_replyUser.o termServer.o device_replyServer.o \
	notifyServer.o tioctlServer.o ourmsgUser.o
LCLHDRS = term.h
HURDLIBS = libtrivfs libports
REMHDRS = ../hurd/trivs.h ../hurd/ports.h
DIST_FILES=hurdio.c
LDFLAGS = -Wl,--no-keep-memory
target = term

include ../Makeconf

$(OBJS): term.h ../hurd/ports.h
users.o: io_reply_U.h tioctl_S.h ourmsg_U.h
input.o: tioctl_S.h
users.o main.o: term_S.h 
devio.o: device_reply_S.h notify_S.h
users.o: ../hurd/trivfs.h


# The reason for -Dout= is to prevent errors for get_init_port,
# get_init_ports, get_init_int, get_init_ints, get_dtable, and get_fd.
# We don't use those, so we're safe in breaking them.
our%_U.h our%User.c: ../hurd/%.defs ../hurd/hurd_types.defs
	$(CPP) $(CPPFLAGS) -Droutine=simpleroutine -Dout= $< \
	| $(MIGCOM) -prefix nowait_ -server /dev/null \
		    -user $(@:%_U.h=%User.c) -header $(@:%User.c=%_U.h)


