#
# Application Makefile   
#

ifndef DEBUG
DEBUG = -g2
endif

ifndef OPTIM
OPTIM = -Osax
endif

PLATFORM=default
PHABOPTS=

#
ASFLAGS	= -g2 -Q -5 -mf -w5 -c
CFLAGS  = -5 -mf -w5 -v$(PLATFORM) $(OPTIM) $(DEBUG) $(PHABOPTS) -Q
CPPFLAGS = $(CFLAGS)
LDFLAGS = -Q -v$(PLATFORM) -5 -mf $(DEBUG) -l Aplib -l phrtlib -l phexlib -l phcontrib -l photon   -l phrender_s $(PHABOPTS)
SDFLAGS = -Q -v$(PLATFORM) -5 -mf $(DEBUG) -l Aplib -l phrtlib -l phexlib -l phcontrib -l photon_s -l phrender_s $(PHABOPTS)

VPATH = ../.

include	../abOfiles
include ../indOfiles
MYOBJ	= balloon.o

include	../abSfiles
include ../indSfiles
MYSRC	= ../balloon.c

include	../abHfiles
include ../indHfiles
MYHDR	=	chatrooms.h

include	../abWfiles

#
# Application Program
#

shr:	$(ABOBJ) $(MYOBJ)
		$(LD) $(SDFLAGS) $(ABOBJ) $(MYOBJ) -M -o chatrooms
		usemsg chatrooms ../Usemsg
		phabbind chatrooms $(ABMOD)

app:	$(ABOBJ) $(MYOBJ)
		$(LD) $(LDFLAGS) $(ABOBJ) $(MYOBJ) -M -o chatrooms
		usemsg chatrooms ../Usemsg
		phabbind chatrooms $(ABMOD)

clean:
		rm -f *.o *.err *.map chatrooms

install:
		-cp -vnf chatrooms /usr/bin/photon

#
# Headers
#

$(ABOBJ) $(MYOBJ):	$(MYHDR)

#
# Prototype Generation
#

proto:
		approto -p $(ABSRC) $(MYSRC) > proto.h
