#%DEPENDS = std_compat_header_wrapper iostream_extension system_call_wrapper posix_compat unit_test

CXX = ../../bin/g++w
RM  = rm

INCLUDES = -I../std_compat_header_wrapper/include \
	   -I../iostream_extension/include \
	   -I../system_call_wrapper/include \
	   -I../unit_test/include

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

LDFLAGS = $(LDADDITIONALFLAGS)

TEST_FILE = ./test-file


all: check

library:

library-lean:
	$(RM) -f *.o

fdstream-test: fdstream-test.o fdstream.h fdstreambuf.h
	$(CXX) -o fdstream-test fdstream-test.o $(CXXFLAGS) $(LDFLAGS)

check: fdstream-test clean-test-environment
	./fdstream-test

clean-test-environment:
	$(RM) -f $(TEST_FILE)

clean: clean-test-environment
	$(RM) -f *.o fdstream-test

.PHONY: all library library-lean build-test check clean

##
fdstream-test.o: fdstream-test.cc fdstreambuf.h fdstream.h
