#%#### makefile AUTOMATICALLY GENERATED ######
#%############### DO NOT EDIT ################
#%### EDIT makefile.src AND make config ######
DEPTH = ../
CONFIG = ../sun4.config
HERE = uva_fixes/

# Sun 4 (OS 4.0.x) configuration file.
# With X11 and Suntools support.

# The file "makefile.hdr" contains code common to all makefiles.  It
# should not be necessary to edit that file.

INCDIR = /home/george/local/src/hips/sys
LIBDIR =
#LIBDIR = /home/george/local/src/hips/lib
DESTDIR = /home/george/local/bin_sun4/hips

#location for files as they are compiled
DEST = .

#OPT = -g
OPT = -O4

FLOAT =
ORIG = ULORIG
BITORDER =  MSBFVERSION

# You can put any system dependent flags here.
ExtraCFLAGS = 

# Note! if defpath LIB_DEST, INC_DEST, and MAN_DEST are defined
# they will be installed in the locations given, otherwise
# they will be left in the directory they are in

#defpath MAN_DEST
#defpath LIB_DEST
#defpath INC_DEST

MAN_DEST =       /usr/man/mann
LIB_DEST =      /usr/local/lib
INC_DEST =      /usr/local/include

# Stuff you like to have removed from directories to "make clean"
OTHERJUNK = core *~ *.BAK \#*\#

LIBSUNTOOLS = -lsuntool -lsunwindow -lpixrect
LIBSUNRAS = -lpixrect
LIBX11 = -lX11

XVIEWHOME = /home/george/data/openwin2.0

# use this with xview 2.0
LIBXVIEW = -lxview -lolgx -lX11 

# use this with xview 1.0
#LIBXVIEW = -lxview  -lX11

################ Beginning of makefile.hdr ################
# Stuff that goes at the beginning of all the makefiles, but is not
# configuration parameters should be in this file.  It is included
# after the configuration file, and before the makefile.src.

# Reset these here because GNU make exports make variables when
# make recurses.  These should be local.
DIRS =
ALLDIRS =
PGMS =

ExtraLIBS = $(DEPTH)lib/libarr.a

LIBS = -L$(LIBDIR) -lhips -lm $(ExtraLIBS)

# any special compiler flags
MachFLAGS = $(FLOAT)

DEFFLAGS = -D$(ORIG) -D$(BITORDER)

IFLAGS = -I. -I$(INCDIR)

CFLAGS = $(OPT) $(ExtraCFLAGS) $(IFLAGS) $(DEFFLAGS) $(MachFLAGS) 

SHELL = /bin/sh

################ End of makefile.hdr ################

#quiet off
# makefile.src for new_sources directory

PGMS = \
        2dhist.out bandrej.out mkheader.out stdseq.out \
	3dhist.out pixshift.out varseq.out \
	avefilt.out exppix.out seehisto.out xorseq.out \
	aveseq.out hiplprnt.out map.out shrink.out
				

.SUFFIXES:	.out

# Default is what is to be made if nothing is specified.
default: $(PGMS)
install: $(PGMS)

.c.out:
	$(CC) $(CFLAGS) $< $(LIBS) -o $*
	strip $*
	mv $* $(DESTDIR)
	@touch $@

# Clean up installed stuff and binaries
pristine: pristine-pgm

# Clean up binaries.
clean:  clean-pgm

man:
	@cp *.n $(MAN_DEST)
################ Beginning of makefile.tlr ################
# Stuff that goes at the end of all the makefiles, but is not
# configuration parameters should be in this file.  It is included
# after the makefile.src.

subdirs:
	@sh -c "if test 'x$(DIRS)' != x ; then eval \
		'set -e ; for dir in $(DIRS) ; do \
			(cd \$$dir ; echo Make ${HERE}\$$dir ; \
			 	make $(MFLAGS) $(DIRMFLAGS) ) ; \
		done' ; \
	  else \
		true ; \
	  fi"

# Install all programs
install-pgm: $(PGMS)
	@sh -c "if test 'x$?' != x ; then eval \
		'for pgm in $? ; do \
			dpgm=\`basename \$$pgm .out\` ; \
			echo cp \$$pgm $(DEST)/\$$dpgm ; \
			cp \$$pgm $(DEST)/\$$dpgm; \
		done' ; \
	else \
	    true ; \
	fi"
	touch install-pgm

# Install subdirectories
install-subdirs: subdirs
	@sh -c "if test 'x$(DIRS)' != x  ; then eval \
		'for dir in $(DIRS) ; do \
			(cd \$$dir ; echo Install ${HERE}\$$dir ; \
			 make $(MFLAGS) $(DIRMFLAGS) install) ; \
		done' ; \
	  else \
		true ; \
	  fi"

#config reads the configuration file and munches the apropriate make files
config: doit
	${DEPTH}Configure "${CONFIG}" "${DEPTH}" "${HERE}" "${MFLAGS}"

config-subdirs: doit
	@-if test 'x$(ALLDIRS)' != x ; then eval \
	    'for d in $(ALLDIRS) ; do \
		    ( cd $$d ; \
		      echo Configuring ${HERE}$$d ; \
		      ${DEPTH}Configure "${CONFIG}" "${DEPTH}" "${HERE}$$d/" \
				    "${MFLAGS}" ) \
	    done' ; \
	else \
	    true ; \
	fi

doit:


# Clean up installed stuff and binaries
# pristine-pgm target invoked pristine target in dirs that make programs
# pristine target in library directory is different.
# 
pristine-pgm: clean-pgm
	@-if test 'x$(PGMS)' != x ; then eval \
		'for pgm in $(PGMS); do \
			dpgm=`basename $$pgm .out`; \
			echo rm -f $(DEST)/$$dpgm $(DEST)/$$dpgm.out; \
			rm -f $(DEST)/$$dpgm $(DEST)/$$dpgm.out; \
		done' ; \
	else \
	    true ; \
	fi
	@-if test 'x$(ALLDIRS)' != x ; then eval \
	    'for dir in $(ALLDIRS); do \
		if test -d $$dir ; then \
			(cd $$dir; echo Make ${HERE}$$dir pristine ; \
			 make $(MFLAGS) pristine); \
		else \
			true; \
		fi; \
	    done' ; \
	else \
	    true ; \
	fi
	-rm -f install install-pgm

# Clean up binaries on program directories.
clean-pgm:
	-rm -f install* *.o
	-rm -f $(OTHERJUNK)
	@-if test 'x$(ALLDIRS)' != x ; then eval \
	    'for dir in $(ALLDIRS); do \
		if test -d $$dir ; then \
			(cd $$dir; echo Clean ${HERE}$$dir ; \
			 make $(MFLAGS) clean); \
		else \
			true; \
		fi; \
	    done' ; \
	else \
	    true ; \
	fi

#ifndef NO_MAKE_MAKEFILE
# Copy config action to here so that GNU make program will work.
makefile:: makefile.src
	${DEPTH}Configure "${CONFIG}" "${DEPTH}" "${HERE}" "${MFLAGS}"
#endif

# Keep people who like to 'make depend' happy.  Allow depend::
# actions in specific makefiles if desired.
depend::

################ End of makefile.tlr ################
