David Glover-Aoki wrote:
CXX = c++
CPPFLAGS = -I /usr/local/include
CXXFLAGS = -O2
LDFLAGS = -L /usr/local/lib
[...]
c++ -O2 -c arg_parser.cc -o arg_parser.o
c++ -O2 -c lzip_index.cc -o lzip_index.o
c++ -O2 -c archive_reader.cc -o archive_reader.o
archive_reader.cc:29:10: fatal error: 'lzlib.h' file not found
#include <lzlib.h>
^~~~~~~~~
Looks like BSD make is ignoring CPPFLAGS. Please, verify that lines 51-52 of
the Makefile are these:
%.o : %.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
Given that the order of the .o and .cc files are inverted in the rule
command and in the command actually executed, maybe BSD make is executing a
default rule lacking $(CPPFLAGS), instead of executing line 52 of the
Makefile. If this is the case, maybe you could compile tarlz with these
commands (note the change from CPPFLAGS to CXXFLAGS):
./configure CXXFLAGS='-O2 -I /usr/local/include' LDFLAGS='-L /usr/local/lib'
make
Hope this helps.
Antonio.