#########################################################################
#
#       MAKEFILE FOR STAND-ALONE XT CODE APPLICATION.  
#
#       RUNWAYS      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: 2005/06/03 16:01:25 $ 		$Revision: 808.1 $
#########################################################################

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

CFLAGS          = -c ${DEBUGFLAG} ${CC_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++
RUNWAYS	= runways
MAIN		= runways.C

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

INTERFACES	= runwaysApplShell.C 


runwaysApplShell.o   : runwaysApplShell.C
	${CXX} ${CCFLAGS_RELAXED} runwaysApplShell.C

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

MISC_CC_SRCS    = LoadSetup.C
MISC_CC_OBJS    = ${MISC_CC_SRCS:.C=.o}


RUNWAYS_CC_SRCS = $(MAIN) $(INTERFACES) $(APPL_SRCS) $(MISC_CC_SRCS)
RUNWAYS_CC_OBJS = $(MAIN:.C=.o) $(INTERFACES:.C=.o) \
                $(APPL_OBJS) $(MISC_CC_OBJS)

LLWAS_EXE =     tdwr_llwas_int    
LLWAS_CC_SRCS = tdwr_llwas_int.C LoadSetup.C Output.C Process.C
LLWAS_CC_OBJS = ${LLWAS_CC_SRCS:.C=.o}

LLIBS     	= -luxsig -lXpm -lXm -lXt -lX11 \
                  -lmisc -lfileformats ${LTIFF} ${LJPEG}\
		-lconfig -lhimath -luser -lm  ${LSEARCH_BSD}


all_ :		$(RUNWAYS) $(LLWAS_EXE)


MKDEPEND_CSRCS = ${RUNWAYS_CC_SRCS} ${LLWAS_CC_SRCS}
depend:; $(MKDEPEND)


$(RUNWAYS): $(RUNWAYS_CC_OBJS)
	@echo Linking    $(RUNWAYS)
	$(CXX) $(LD_OPT) $(RUNWAYS_CC_OBJS) $(LDFLAGS) $(LLIBS) -o $(RUNWAYS)
	@rootchown  operator $(RUNWAYS)
	@rootchmod 6775 $(RUNWAYS)
	@rootchown operator *.rf
	@rootchmod 664 *.rf

$(LLWAS_EXE):  $(LLWAS_CC_OBJS)
		@echo Linking    $(LLWAS_EXE)
		${CXX} ${LD_OPT} $(LLWAS_CC_OBJS) $(LDFLAGS) \
		-lmisc -lconfig -ldspi -lhimath -luser -lm ${LSEARCH_BSD} -o $(LLWAS_EXE)

install:	$(RUNWAYS) $(LLWAS_EXE)
		rootcp -p $(RUNWAYS) ${IRIS_BIN}
		rootcp -p $(LLWAS_EXE) ${IRIS_BIN}
		rootcp -p $(RUNWAYS).rf $(IRIS_APP_DEFAULTS)$(RUNWAYS)
		rootcp -p $(RUNWAYS).rf /usr/lib/X11/app-defaults/$(RUNWAYS)
		( cd ${IRIS_BIN} ; strip ${RUNWAYS} ; strip ${LLWAS_EXE} ;\
		  rootchown operator ${RUNWAYS} ; rootchmod 775 ${RUNWAYS} ;\
		  rootchown operator ${LLWAS_EXE} ; rootchmod 775 ${LLWAS_EXE})
		( cd ${IRIS_APP_DEFAULTS} ; \
		  rootchown operator ${RUNWAYS} ; rootchmod 664 ${RUNWAYS})
		( cd /usr/lib/X11/app-defaults ; \
		  rootchown operator ${RUNWAYS} ; rootchmod 664 ${RUNWAYS})

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



# DO NOT DELETE

runways.o: ../../include/sigtypes.h ../../include/signoarch.h
runways.o: ../../include/user_lib.h ../../include/headers.h
runways.o: ../../include/setup.h ../../include/uxsig_lib.h runways.h
runways.o: ../../include/UxXt.h ../../include/UxInterf.h
runwaysApplShell.o: ../../include/UxXt.h ../../include/UxInterf.h
runwaysApplShell.o: ../../include/sigtypes.h ../../include/signoarch.h
runwaysApplShell.o: ../../include/headers.h ../../include/user_lib.h
runwaysApplShell.o: ../../include/uxsig_lib.h ../../include/xpm_lib.h llwas.h
runwaysApplShell.o: runways.h
LoadSetup.o: ../../include/sigtypes.h ../../include/signoarch.h
LoadSetup.o: ../../include/signetwork.h ../../include/projection.h
LoadSetup.o: ../../include/headers.h ../../include/product.h
LoadSetup.o: ../../include/himath_lib.h ../../include/misc_lib.h
LoadSetup.o: ../../include/user_lib.h llwas.h
tdwr_llwas_int.o: ../../include/sigtypes.h ../../include/signoarch.h
tdwr_llwas_int.o: ../../include/headers.h ../../include/setup.h
tdwr_llwas_int.o: ../../include/user_lib.h ../../include/config_lib.h
tdwr_llwas_int.o: ../../include/misc_lib.h llwas.h
LoadSetup.o: ../../include/sigtypes.h ../../include/signoarch.h
LoadSetup.o: ../../include/signetwork.h ../../include/projection.h
LoadSetup.o: ../../include/headers.h ../../include/product.h
LoadSetup.o: ../../include/himath_lib.h ../../include/misc_lib.h
LoadSetup.o: ../../include/user_lib.h llwas.h
Output.o: ../../include/sigtypes.h ../../include/signoarch.h
Output.o: ../../include/setup.h ../../include/headers.h
Output.o: ../../include/product.h ../../include/user_lib.h
Output.o: ../../include/misc_lib.h llwas.h
Process.o: ../../include/sigtypes.h ../../include/signoarch.h
Process.o: ../../include/dsp.h ../../include/setup.h ../../include/headers.h
Process.o: ../../include/iris_task.h ../../include/ingest.h
Process.o: ../../include/product.h ../../include/user_lib.h
Process.o: ../../include/misc_lib.h llwas.h
