srcdir = @srcdir@
topdir = @topdir@

include ../Makefile.inc
topdir=..
topincdir=../../../include

DO_DEBUG = @DO_DEBUG@
CC = @CC@
CXX = @CXX@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@

SWLIB = swstruct.a

LIBS=$(SWLIB)

LOADLIBS = 

ifeq ($(DO_DEBUG),)
DEBUGLIBOBJECTS = 
DO_CPP_ASSEM = 
DO_C_ASSEM = 
else
DEBUGLIBOBJECTS = 
DO_CPP_ASSEM = $(CXX) $(CFLAGS) -S -gstabs+ -Wno-unused $(CPPFLAGS) -c -o $(OUT_PATH)/$*.S $<
endif

OUT_PATH = .
LDFLAGS =

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

.SUFFIXES:
.SUFFIXES: .cxx .o

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


SWOBJS= 	\
	swsattributefile.o \
	swsbundle.o \
	swscontrolfile.o \
	swsdistribution.o \
	swsfile.o \
	swsfileset.o \
	swshost.o \
	swsmedia.o \
	swsnode.o \
	swsproduct.o \
	swscollection.o \
	swspsf.o \
	swssubproduct.o \
	swstruct_i.o \
	swstruct_misc.o \
	swsvendor.o \
	swscategory.o 



all: $(TARGET)

everything: $(LIBS)

$(SWLIB): $(SWOBJS)
	ar rc $(SWLIB) $(SWOBJS)
	ranlib $(SWLIB)
	cp -p $(SWLIB) ../lib

clean:
	rm -f *.S *.a *.o *~ a.out
	rm -f lib/*.a ../lib/*.a

install:

distclean: clean
	rm -f .depend Makefile

atarfile: tarfile

tarfile: NOFILE
	false
NOFILE:

depend:
	( > .depend )

#	($(CPP) $(CFLAGS) -M $(srcdir)/*.cxx > .depend; exit 0)

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


