# Host Status # # Douglas Thrift # # $Id$ cxxsrc = HostStatus.cpp Host.cpp cxxhdr = $(patsubst %.cpp, %.hpp, ${cxxsrc}) cxxobj = $(patsubst %.cpp, object/%.o, ${cxxsrc}) cxxdep = $(patsubst %.cpp, object/%.d, ${cxxsrc}) exe = hoststatus.cgi ifeq ($(shell uname -r | grep -v ^4\\.),) CXX := g++34 endif CXXFLAGS := -g -O2 CPPFLAGS += -I$(HOME)/SourceForge.net/pstreams all: ${exe} ${exe}: ${cxxobj} $(CXX) $(LDFLAGS) $+ $(LOADLIBES) $(LDIBS) -o $@ object/%.o: %.cpp @mkdir -p $(@D) $(CXX) -MP -MD $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< -include ${cxxdep} install: ${exe} install -pv ${exe} ~/DouglasThrift.net/WWW/data/topsecret/auth/${exe} clean: -rm -rf object ${exe} core $(patsubst %, %.core, ${exe}) \ $(patsubst %, %.stackdump, ${exe})