###############################################################################
#
#	RIO utility makefile for linux g++
#
#	Ashpool Systems (c) 1999
#
###############################################################################

CXXFLAGS=-g -Wall 
# -fhandle-exceptions
DESTDIR=/home/sdo/bin

APPS= 		rio als aformat acp arm amem add adump

all: 		$(APPS) 

install:	$(APPS)
		install -c $(APPS) $(DESTDIR)

depend:
		makedepend -I/usr/include/g++ *.cpp

adump:		adump.o rio.o rio_io.o
		g++ $(CXXFLAGS) -o adump adump.o rio.o rio_io.o

arm:		arm.o rio.o set_ix.o rio_glob.o rio_io.o
		g++ $(CXXFLAGS) -o arm arm.o rio.o set_ix.o rio_glob.o rio_io.o

aformat:	aformat.o rio.o progress.o set_ix.o rio_io.o
		g++ $(CXXFLAGS) -o aformat aformat.o rio.o progress.o set_ix.o rio_io.o

acp:		acp.o rio.o progress.o set_ix.o rio_io.o rio_glob.o
		g++ $(CXXFLAGS) -o acp acp.o rio.o progress.o set_ix.o rio_io.o rio_glob.o

amem:		amem.o rio.o time.o rio_io.o
		g++ $(CXXFLAGS) -o amem amem.o rio.o time.o rio_io.o

als:		als.o rio.o time.o rio_io.o
		g++ $(CXXFLAGS) -o als als.o rio.o time.o rio_io.o

add:		add.o rio.o rio_io.o
		g++ $(CXXFLAGS) -o add add.o rio.o rio_io.o

rio:		app.o rio.o rio_io.o
		g++ $(CXXFLAGS) -o rio app.o rio.o rio_io.o


.cpp.o:
	g++ $(CXXFLAGS) -c $<

.SUFFIXES:	.cpp

clean:
		rm -f rio $(APPS)
		rm -f *.o

tar:
		tar cvf rio-1.0.tar *.cpp *.h *.1 Makefile rio-1.0.lsm \
			README gpl.txt

acp.o:   	acp.cpp rio.h common.h progress.h rio_error.h
add.o:		add.cpp rio.h rio_error.h
adump.o:	add.cpp rio.h rio_error.h
aformat.o: 	aformat.cpp rio.h common.h progress.h rio_error.h
als.o:   	als.cpp rio.h common.h rio_error.h
amem.o:		amem.cpp rio.h rio_error.h
app.o: 		rio.h rio_error.h
arm.o:	 	arm.cpp rio.h common.h set_ix.h rio_glob.h rio_error.h
progress.o:	progress.cpp progress.h rio_error.h
rio.o: 		binary.h rio.h rio_error.h
rio_glob.o:	rio_glob.cpp rio_glob.h rio_error.h
rio_io.o:	rio_io.cpp rio_io.h
set_ix.o:	set_ix.cpp set_ix.h rio.h rio_error.h
time.o:		time.cpp time.h rio_error.h
