##############################################################
## A Gmakefile - This is necessary for all GRASS programs   ##
##  		 and links all necessary functions and      ##
##		 libraries.				    ##
##############################################################


PGM = r.surf.fractal
#------------^ Name of the GRASS module here.


#PROG = debug
#--------^ Swap this line with the PROG line above for debugging.
#	   This will create an executable in the current
#	   directory that can be passed to dbx(tool).


LIBES = $(GISLIB) $(GMATHLIB)
DEPLIBS= $(DEPGISLIB) $(DEPGMATHLIB)
#-----------^ Library necessary for all GRASS programs.
#---------------------^ Numerical function fft

INCLUDES =\
		frac.h
#-----------------^  Any include files go here.

OBJ =\
	main.o		\
	interface.o	\
	process.o	\
	max_pow.o	\
	spec_syn.o	\
	write_rast.o
#----------^ These are the names of all seperate files that
#	     the programmer creates. Must have ONE tab in
#	     front of each line.

######### DEPENDENCIES #########

$(BIN_CMD)/$(PGM): $(OBJ) $(DEPLIBS)
	$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBES) $(MATHLIB) $(XDRLIB) $(FFTWLIB)
#
#-----^ This compiles the whole program bringing all labels together.

$(OBJ): $(INCLUDES)

$(DEPLIBS): #
#---^ Ignore this line (used for future additions of the library).
