#########################################################################
#
#       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: 2005/06/03 16:01:24 $ 		$Revision: 808.1 $
#########################################################################

CFLAGS		= -c ${DEBUGFLAG} ${C_OPT} -D${MACH_OS} -DMOTIF -DSYSV \
                  -DXT_CODE -DXOPEN_CATALOG \
                  -I./  -I../../include -I${IRIS_ROOT}/include

CXXFLAGS        = -c  ${DEBUGFLAG}  ${CC_OPT} -D${MACH_OS} -DMOTIF -DSYSV \
                  -DXT_CODE -DXOPEN_CATALOG  \
                  -I./  -I../../include -I${IRIS_ROOT}/include
CCFLAGS = ${CXXFLAGS}

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

DSPX            = dspx
EXEC_SCOPE	= exec_scope

LANGUAGE        = ANSI C
EXECUTABLE	= dspx_scope
MAIN		= dspx_scope.c

INTERFACES	= dspx_scope_applshell.c 

APPL_SRCS       = dspx_func.c
APPL_OBJS = ${APPL_SRCS:.c=.o}

DSPX_SCOPE_C_SRCS = ${MAIN} ${INTERFACES} ${APPL_SRCS}
DSPX_SCOPE_C_OBJS = ${MAIN:.c=.o} ${INTERFACES:.c=.o} ${APPL_OBJS}

DSPX_C_SRCS		= dspx.c
DSPX_C_OBJS		= ${DSPX_C_SRCS:.c=.o}

EXEC_SCOPE_C_SRCS	= exec_scope.c
EXEC_SCOPE_C_OBJS	= ${EXEC_SCOPE_C_SRCS:.c=.o}



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

all:		${EXECUTABLE} ${DSPX} ${EXEC_SCOPE}

MKDEPEND_CSRCS = ${DSPX_SCOPE_C_SRCS} ${DSPX_C_SRCS} ${EXEC_SCOPE_C_SRCS}
depend:; ${MKDEPEND}

${EXECUTABLE}: ${DSPX_SCOPE_C_OBJS}
	${CXX} ${LD_OPT} ${DSPX_SCOPE_C_OBJS} ${LDFLAGS} ${LLIBS} -o ${EXECUTABLE}
	rootchown operator ${EXECUTABLE}
	rootchmod 775 ${EXECUTABLE}
	rootchown operator *.rf
	rootchmod 664 *.rf

${DSPX}: ${DSPX_C_OBJS}
	${CXX} ${LD_OPT} ${DSPX_C_OBJS} ${LDFLAGS} ${LLIBS} -o ${DSPX}
	rootchown operator ${DSPX}
	rootchmod 775 ${DSPX}


${EXEC_SCOPE}: ${EXEC_SCOPE_C_OBJS}
	${CXX} ${LD_OPT} ${EXEC_SCOPE_C_OBJS} ${LDFLAGS} ${LLIBS} -o ${EXEC_SCOPE}
	rootchown operator ${EXEC_SCOPE}
	rootchmod 775 ${EXEC_SCOPE}


install:	${EXECUTABLE} ${DSPX}
		rootcp -p ${EXECUTABLE} ${IRIS_BIN}
		rootcp -p ${DSPX}       ${IRIS_BIN}
		rm -f temp.rf ; cat *.rf > temp.rf
		rootcp -p temp.rf ${IRIS_APP_DEFAULTS}${EXECUTABLE}
		rootcp -p temp.rf /usr/lib/X11/app-defaults/${EXECUTABLE}
		rm -f temp.rf
		( cd ${IRIS_BIN} ; strip ${EXECUTABLE} ; \
		  rootchown operator ${EXECUTABLE} ; rootchmod 775 ${EXECUTABLE} )
		( cd ${IRIS_BIN} ; strip ${DSPX} ; \
		  rootchown operator ${DSPX}       ; rootchmod 775 ${DSPX}       )
		( 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} ${DSPX} ${EXEC_SCOPE} core
clean:		cleanexe
		rm -f *.o *.usg *.cat*
# DO NOT DELETE

dspx_scope.o: ../../include/sigtypes.h ../../include/signoarch.h dspx_scope.h
dspx_scope.o: ../../include/UxXt.h ../../include/UxInterf.h
dspx_scope_applshell.o: ../../include/UxXt.h ../../include/UxInterf.h
dspx_scope_applshell.o: ../../include/sigtypes.h ../../include/signoarch.h
dspx_scope_applshell.o: ../../include/dsp.h ../../include/dsp_lib.h
dspx_scope_applshell.o: ../../include/uxsig_lib.h dspx_scope.h
dspx_func.o: ../../include/UxXt.h ../../include/UxInterf.h
dspx_func.o: ../../include/sigtypes.h ../../include/signoarch.h
dspx_func.o: ../../include/xpm_lib.h dspx_scope.h
dspx.o: ../../include/sigtypes.h ../../include/signoarch.h
dspx.o: ../../include/dsp.h ../../include/user_lib.h ../../include/dsp_lib.h
dspx.o: dspx_scope.h
exec_scope.o: ../../include/sigtypes.h ../../include/signoarch.h
exec_scope.o: ../../include/dsp.h ../../include/dsp_lib.h dspx_scope.h
