#
# Copyright (c) 1997 The University of Utah and
# the Computer Systems Laboratory at the University of Utah (CSL).
#
# This file is part of Flick, the Flexible IDL Compiler Kit.
#
# Flick 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 of the License, or
# (at your option) any later version.
#
# Flick 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 Flick; see the file COPYING.  If not, write to
# the Free Software Foundation, 59 Temple Place #330, Boston, MA 02111, USA.
#

# Set this to your Flick source tree.
SRCDIR=/home/users/barneyrubble/flick-src
# Set this to your Flick object directory
OBJDIR=/home/users/barneyrubble/flick-obj

CC=gcc
CFLAGS=-I$(OBJDIR)/runtime/headers -I$(SRCDIR)/runtime/headers -g
LIBS=-L$(OBJDIR)/lib -lflick-suntcp

ONC_FE=$(OBJDIR)/bin/flick-fe-sun
ONC_PG=$(OBJDIR)/bin/flick-c-pfe-sun
ONC_BE=$(OBJDIR)/bin/flick-c-pbe-sun

all: phonebook phoneserver

phonebook: phone-client.o phonebook.o
	$(CC) -o phonebook phone-client.o phonebook.o $(LIBS)

phoneserver: phone-server.o phone-workfuncs.o
	$(CC) -o phoneserver phone-server.o phone-workfuncs.o $(LIBS)

phone-client.o: phone-client.c phone-client.h
	$(CC) $(CFLAGS) -o phone-client.o -c phone-client.c

phone-server.o: phone-server.c phone-server.h
	$(CC) $(CFLAGS) -o phone-server.o -c phone-server.c

phone-server.c phone-server.h phone-client.c phone-client.h: phone.x
	$(ONC_FE) phone.x && \
	$(ONC_PG) -s -o phone-server.prc phone.aoi && \
	$(ONC_BE) phone-server.prc && \
	$(ONC_PG) -c -o phone-client.prc phone.aoi
	$(ONC_BE) phone-client.prc && \
	rm -rf phone-client.prc phone-server.prc phone.aoi

phonebook.o: phonebook.c
	$(CC) $(CFLAGS) -o phonebook.o -c phonebook.c

phone-workfuncs.o: phone-workfuncs.c
	$(CC) $(CFLAGS) -o phone-workfuncs.o -c phone-workfuncs.c

clean:
	rm -rf phone-client.? phone-server.? phonebook phoneserver *.o

## End of file.

