#%ARCHIVE = libdebugstream.a
#%DEPENDS = std_compat_header_wrapper

CXX = ../../bin/g++w
MAKE_ARCHIVE = ../../bin/make-archive
RM = rm

INCLUDES = -I../std_compat_header_wrapper/include

CXXFLAGS = -g $(CCXXOPTFLAGS) $(CXXOPTFLAGS) $(INCLUDES) \
	      $(CCXXADDITIONALFLAGS) $(CXXADDITIONALFLAGS)

all: libdebugstream.a

library: libdebugstream.a

library-only: libdebugstream.a
	$(RM) -f *.o debugstream-test

debugstream-test: libdebugstream.a debugstream-test.o debugstream.h nullbuf.h
	$(CXX) -o debugstream-test debugstream-test.o libdebugstream.a \
		$(CXXFLAGS)

libdebugstream.a: debugstream.o
	$(MAKE_ARCHIVE) libdebugstream.a debugstream.o

clean:
	$(RM) -f *.o libdebugstream.a debugstream-test

.PHONY: all library library-only clean

##
debugstream.o: debugstream.cc debugstream.h nullbuf.h
debugstream-test.o: debugstream-test.cc debugstream.h nullbuf.h
