# you may set this to empty in order to install the files
# non-locally.
LOCAL=local

USRDIR=/usr/$(LOCAL)

# directory for tbents.txt
TBLIBDIR= $(USRDIR)/share/xml/tbook

# directory for the stylesheets
XSLTDIR= $(USRDIR)/share/xml/texi2latex

# destination directory for executables
DESTDIR= $(USRDIR)/bin

# Options for the C++ compiler
CXXFLAGS = -O2

# The standard file permissions for installed 
# non-executables
PERMS= a+r,u+w

# No changes should be necessary below this line 
# -----------------------------------------------------

.PHONY : install clean

tbrplent : tbrplent.cc
	$(CXX) -o $@ $(CXXFLAGS) -DTBLIBDIR=\"$(TBLIBDIR)\" $<

install : tbrplent
	install -d $(ROOT)$(DESTDIR)
	install tbrplent $(ROOT)$(DESTDIR)
	install -d $(ROOT)$(TBLIBDIR)
	install --mode=$(PERMS) tbents.txt $(ROOT)$(TBLIBDIR)

clean :
	rm -f tbrplent
