srcdir = @srcdir@
topdir = @topdir@
#VPATH = $(srcdir)

# GNU make targets
#all
#install
#install-html
#install-dvi
#install-pdf
#install-ps
#uninstall
#install-strip
#clean
#distclean
#mostlyclean
#maintainer-clean
#info
#dvi
#html
#pdf
#ps
#dist
#check
#
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
libexecdir=@libexecdir@
datadir=@datadir@
mandir=@mandir@
mansubdir=@mansubdir@

include $(topdir)/Makefile.inc
DO_DEBUG = @DO_DEBUG@
CC = @CC@
CXX = @CXX@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@

LIB =
SWSTRUCTLIB = swstructlib.a
LOADLIBS = 
LIBS = $(SWSTRUCTLIB)
PROGS =
OUT_PATH = .

SUBDIRS = src
ifeq (.depend,$(wildcard .depend))
TARGET=everything
else
TARGET=depend everything
endif

.SUFFIXES:
.SUFFIXES: .cxx .o

.cxx.o:
	$(CXX) $(CFLAGS) -c -o $(OUT_PATH)/$*.o  $< 

all: $(TARGET)

everything: $(SWSTRUCTLIB)  $(PROGS)

$(SWSTRUCTLIB): NOFILE
	cd src && $(MAKE) installlib

$(PROGS): $(LIBS)

distdir:
install:
install-data:
install-exec:
install-html:
install-dvi:
install-pdf:
install-ps:
install-strip:
install-info:
installdirs:
installcheck:
uninstall:
# clean:
mostlyclean: clean
# distclean:
maintainer-clean: distclean
info:
dvi:
html:
pdf:
ps:
dist:
check:
tags:
ctags:

.PHONY:		clean
clean:
	for d in $(SUBDIRS); do \
		(cd $$d; $(MAKE) $@) ;\
	done
	rm -f *.S *.a *.o *~ $(PROGS) a.out
	rm -f lib/*.a

.PHONY:		distclean
distclean: clean
	for d in $(SUBDIRS); do \
		(cd $$d; $(MAKE) $@) ;\
	done
	rm -f .depend Makefile Makefile.inc
	rm -f config.cache \
		config.status \
		config.log

atarfile: tarfile

tarfile: NOFILE
	false

NOFILE:

.PHONY:		depend
depend:
#	for d in $(SUBDIRS); do \
#		(cd $$d; $(MAKE) $@) ;\
#	done

ifeq (.depend,$(wildcard .depend))
include .depend
endif



