CC  = ../../bin/gccw
CXX = ../../bin/g++w
MAKE_AR = ../../bin/make_ar
RM = rm

CFLAGS   = -g $(CCXXOPTFLAGS) $(COPTFLAGS) \
	      $(CCXXADDITIONALFLAGS) $(CADDITIONALFLAGS)
CXXFLAGS = -g $(CCXXOPTFLAGS) $(CXXOPTFLAGS) \
	      $(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_AR) libdebugstream.a debugstream.o

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

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