.IGNORE:

SHELL = /bin/sh

prefix = @prefix@
bindir = $(prefix)/bin

CC        = @CC@  @CFLAGS@   @CPPFLAGS@ @BBH_RNPLAPP_CINC@  @DEFS@ @BBH_DEFS@ 
CC_LOAD   = @CC@  @CFLAGS@   @LDFLAGS@  @BBH_RNPLAPP_LPATHS@

CLIBS     = @BBH_RNPLAPP_CLIBS@ 

.c.o:
	$(CC) -c $*.c

UTILITIES = hdfinfo hdftovs

all: $(UTILITIES) install

install: $(UTILITIES)
	if test ! -d $(bindir); then\
		mkdir $(bindir);\
	fi
	cp $(UTILITIES) $(bindir)

hdfinfo: hdfinfo.o 
	$(CC_LOAD) hdfinfo.o $(CLIBS) -o hdfinfo

hdftovs: hdftovs.o 
	$(CC_LOAD) hdftovs.o $(CLIBS) -o hdftovs

clean:
	rm *.o $(UTILITIES) > /dev/null 2>&1
	rm Makefile > /dev/null 2>&1
