#
# Application Makefile   
#

ifndef DEBUG
DEBUG = -g
endif

ifndef OPTIM
OPTIM = -Osax
endif

ifndef MODEL
MODEL = f
endif

PLATFORM=default
#
CFLAGS  = -v$(PLATFORM) -3 -mf -w5 $(OPTIM) $(DEBUG)
CFLAGS += -I$(FT)/include -I$(CY_INCLUDE)
DFLAGS  = -v$(PLATFORM) -3 -mf $(DEBUG)
DFLAGS += -l phcontrib -l phexlib -l phrtlib -l Aplib 
DFLAGS += -L$(FT)/lib -l tracer$(MODEL)
LDFLAGS = -l photon   $(DFLAGS)
SDFLAGS = -l photon_s $(DFLAGS)

VPATH = ../.

include	../abOfiles
include ../indOfiles

include	../abSfiles
include ../indSfiles

include	../abHfiles
include ../indHfiles

#
# Application Program
#

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

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

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

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

#
# Headers
#

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

#
# Prototype Generation
#

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