#
# Application Makefile   
#

ifndef DEBUG
DEBUG = -g0
endif

ifndef OPTIM
OPTIM = -Osax
endif

PLATFORM=default
#
DEST = /usr/bin/photon/phcd
CFLAGS  = -v$(PLATFORM) -3 -mf -w5 -b $(OPTIM) $(DEBUG) 
LDFLAGS = -v$(PLATFORM) -3 -mf -b $(DEBUG) -l photon3r -l phcontrib -l phexlib -l phrtlib -l Aplib3r 
SDFLAGS = -v$(PLATFORM) -3 -mf -b $(DEBUG) -l photon_s -l phcontrib -l phexlib -l phrtlib -l Aplib3r 

VPATH = ../.

include	../abOfiles
include ../indOfiles

include	../abSfiles
include ../indSfiles

include	../abHfiles
include ../indHfiles

#
# Application Program
#

shr:	$(ABOBJ) $(MYOBJ)
		$(LD) $(SDFLAGS) $(ABOBJ) $(MYOBJ) -M \
		-o phcd
		usemsg phcd ../abmain.c
		phabbind phcd

app:	$(ABOBJ) $(MYOBJ)
		$(LD) $(LDFLAGS) $(ABOBJ) $(MYOBJ) -M \
		-o phcd
		usemsg phcd ../abmain.c
		phabbind phcd

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

install:
		cp -vnf phcd $(DEST)
		chown root $(DEST)
		chmod +s  $(DEST)

#
# Headers
#

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

#
# Prototype Generation
#

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