#
# Application Makefile   
#

ifndef DEBUG
DEBUG = -g
endif

ifndef OPTIM
OPTIM = -O
endif

PLATFORM=gcc_ntoppcbe
PHABOPTS= 

#
CFLAGS  = -V$(PLATFORM) -w5 $(OPTIM) $(DEBUG) $(PHABOPTS) -I.
CXXFLAGS = $(CFLAGS)
LDFLAGS = -V$(PLATFORM) -Bstatic $(DEBUG) -l Aplib -l phrtlib -l phexlib -l phcontrib -l photon $(PHABOPTS)
SDFLAGS = -V$(PLATFORM)          $(DEBUG) -l Aplib -l phrtlib -l phexlib -l phcontrib -l photon $(PHABOPTS)

VPATH = ..

include	../abOfiles
include ../indOfiles

include	../abSfiles
include ../indSfiles

include	../abHfiles
include ../indHfiles

include	../abWfiles

#
# Application Program
#

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

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

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

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

#
# Headers
#

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

#
# Prototype Generation
#

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