#########################################################################
#
#       MAKEFILE FOR STAND-ALONE XT CODE APPLICATION.  
#
#       EXECUTABLE      is the name of the executable to be created 
#       MAIN            is the .c file containing your main() function 
#       INTERFACES      is a list of the generated C code files
#       APP_OBJS        is a (possibly empty) list of the object code
#                       files that form the non-interface portion of
#                       your application
#
#       In the first three statements, the variables on the right 
#	of the equal sign will be replaced with their corresponding
#       values when the makefile is automatically generated.
#
#       This template is used for makefiles which do not reference 
#       the Ux runtime library.
#
#  	$Date: 2004/10/19 20:45:24 $ 		$Revision: 806.1 $
#########################################################################

CFLAGS_ALL      = -D${MACH_OS} -DMOTIF -DSYSV -DXT_CODE -DXOPEN_CATALOG \
                  -I./  -I../../include -I${IRIS_ROOT}/include

CFLAGS          = -c ${DEBUGFLAG} ${C_OPT}  ${CFLAGS_ALL}
CXXFLAGS        = -c ${DEBUGFLAG} ${CC_OPT} ${CFLAGS_ALL}
CCFLAGS = ${CXXFLAGS}

CFLAGS_RELAXED  = -c ${DEBUGFLAG} ${C_OPT_RELAXED}  ${CFLAGS_ALL}
CCFLAGS_RELAXED = -c ${DEBUGFLAG} ${CC_OPT_RELAXED} ${CFLAGS_ALL}

LDFLAGS         = -L../../libs/lib -L${IRIS_ROOT}/libs/lib ${LPATH_X11}

LANGUAGE        = C++
EXECUTABLE	= overlay
MAIN		= overlay.C

all : all_      # Just to insure that it's first

INTERFACES	= overlayApplShell.C \
	optionsToolDiag.C \
	openFileToolDiag.C \
	addToolDiag.C \
	layerToolDiag.C \
	headerToolDiag.C 


overlayApplShell.o   : overlayApplShell.C
	${CXX} ${CCFLAGS_RELAXED} overlayApplShell.C
optionsToolDiag.o   : optionsToolDiag.C
	${CXX} ${CCFLAGS_RELAXED} optionsToolDiag.C
openFileToolDiag.o   : openFileToolDiag.C
	${CXX} ${CCFLAGS_RELAXED} openFileToolDiag.C
addToolDiag.o   : addToolDiag.C
	${CXX} ${CCFLAGS_RELAXED} addToolDiag.C
layerToolDiag.o   : layerToolDiag.C
	${CXX} ${CCFLAGS_RELAXED} layerToolDiag.C
headerToolDiag.o   : headerToolDiag.C
	${CXX} ${CCFLAGS_RELAXED} headerToolDiag.C


APPL_SRCS       = 
APPL_OBJS       = ${APPL_SRCS:.C=.o}

MISC_CC_SRCS    = options.C \
                  newImage.C
MISC_CC_OBJS    = ${MISC_CC_SRCS:.C=.o}


OVERLAY_CC_SRCS = $(MAIN) $(INTERFACES) $(APPL_SRCS) $(MISC_CC_SRCS)
OVERLAY_CC_OBJS = $(MAIN:.C=.o) $(INTERFACES:.C=.o) \
                $(APPL_OBJS) $(MISC_CC_OBJS)


LLIBS            = -luxsig -ltvsubs -lXpm -lXm -lXt -lX11 \
                   -lconfig -lmaps -lmisc -lvtv -lfileformats \
                   -ltiff -ljpeg -lhimath -luser -lXmu -lm  ${LSEARCH_BSD}

all_ :		$(EXECUTABLE)


MKDEPEND_CSRCS = ${OVERLAY_CC_SRCS}
depend:; $(MKDEPEND)


$(EXECUTABLE): $(OVERLAY_CC_OBJS)
	@echo Linking $(EXECUTABLE)
	$(CXX) $(LD_OPT) $(OVERLAY_CC_OBJS) $(LDFLAGS) $(LLIBS) -o $(EXECUTABLE)
	@rootchown  operator $(EXECUTABLE)
	@rootchmod 775 $(EXECUTABLE) 
	@rootchown operator *.rf
	@rootchmod 664 *.rf

install:	$(EXECUTABLE)
		rootcp -p $(EXECUTABLE) ${IRIS_BIN}
		cat *.rf > temp.rf
		rootcp -p temp.rf $(IRIS_APP_DEFAULTS)$(EXECUTABLE)
		rootcp -p temp.rf /usr/lib/X11/app-defaults/$(EXECUTABLE)
		rm temp.rf
		( cd ${IRIS_BIN} ; strip $(EXECUTABLE) ; \
		  rootchown operator $(EXECUTABLE) ; rootchmod 775 $(EXECUTABLE))
		( cd ${IRIS_APP_DEFAULTS} ; \
		  rootchown operator $(EXECUTABLE) ; rootchmod 664 $(EXECUTABLE))
		( cd /usr/lib/X11/app-defaults ; \
		  rootchown operator $(EXECUTABLE) ; rootchmod 664 $(EXECUTABLE))

cleanexe:;	rm -f $(EXECUTABLE) core
clean:		cleanexe
		rm -f *.o

# DO NOT DELETE

overlay.o: ../../include/sigtypes.h ../../include/signoarch.h
overlay.o: ../../include/projection.h ../../include/user_lib.h
overlay.o: ../../include/uxsig_lib.h ../../include/UxXt.h
overlay.o: ../../include/UxInterf.h overlay.h
overlayApplShell.o: ../../include/UxXt.h ../../include/UxInterf.h
overlayApplShell.o: ../../include/sigtypes.h ../../include/signoarch.h
overlayApplShell.o: ../../include/projection.h ../../include/user_lib.h
overlayApplShell.o: ../../include/uxsig_lib.h ../../include/vtv_lib.h
overlayApplShell.o: ../../include/xpm_lib.h overlay.h
optionsToolDiag.o: ../../include/UxXt.h ../../include/UxInterf.h
optionsToolDiag.o: ../../include/sigtypes.h ../../include/signoarch.h
optionsToolDiag.o: ../../include/projection.h ../../include/user_lib.h
optionsToolDiag.o: overlay.h
openFileToolDiag.o: ../../include/UxXt.h ../../include/UxInterf.h
openFileToolDiag.o: ../../include/sigtypes.h ../../include/signoarch.h
openFileToolDiag.o: ../../include/projection.h overlay.h
addToolDiag.o: ../../include/UxXt.h ../../include/UxInterf.h
addToolDiag.o: ../../include/sigtypes.h ../../include/signoarch.h
addToolDiag.o: ../../include/projection.h ../../include/user_lib.h
addToolDiag.o: ../../include/uxsig_lib.h ../../include/vtv_lib.h overlay.h
layerToolDiag.o: ../../include/UxXt.h ../../include/UxInterf.h
layerToolDiag.o: ../../include/sigtypes.h ../../include/signoarch.h
layerToolDiag.o: ../../include/projection.h ../../include/uxsig_lib.h
layerToolDiag.o: ../../include/vtv_lib.h overlay.h
headerToolDiag.o: ../../include/UxXt.h ../../include/UxInterf.h
headerToolDiag.o: ../../include/sigtypes.h ../../include/signoarch.h
headerToolDiag.o: ../../include/projection.h ../../include/user_lib.h
headerToolDiag.o: overlay.h
options.o: ../../include/UxXt.h ../../include/UxInterf.h
options.o: ../../include/sigtypes.h ../../include/signoarch.h
options.o: ../../include/projection.h ../../include/vtv_lib.h overlay.h
newImage.o: ../../include/UxXt.h ../../include/UxInterf.h
newImage.o: ../../include/sigtypes.h ../../include/signoarch.h
newImage.o: ../../include/projection.h ../../include/setup.h
newImage.o: ../../include/config_lib.h ../../include/fileformats_lib.h
newImage.o: ../../include/himath_lib.h ../../include/maps_lib.h
newImage.o: ../../include/misc_lib.h ../../include/tvsubs_lib.h
newImage.o: ../../include/user_lib.h ../../include/uxsig_lib.h
newImage.o: ../../include/vtv_lib.h overlay.h
