# Host Update # # Douglas Thrift # # $Id$ CSRC = HostUpdate.cpp Host.cpp HDRS = $(patsubst %.cpp, %.hpp, ${CSRC}) OBJS = $(patsubst %.cpp, %.o, ${CSRC}) EXEC = hostupdate.cgi CXX ?= g++ CXXFLAGS ?= -g -O2 CPPFLAGS ?= DEFS ?= LDFLAGS ?= LIBS ?= RM = del ifeq ($(shell del /?),) RM = rm endif all: ${EXEC} ${EXEC}: ${OBJS} ${CXX} ${LDFLAGS} ${OBJS} -o ${EXEC} ${LIBS} %.o:%.cpp ${CXX} ${CXXFLAGS} ${CPPFLAGS} $< -c ${DEFS} depend: ${CSRC} ${HDRS} ${CXX} -MM ${CSRC} ${CPPFLAGS} ${DEFS} > depend ifeq (,$(filter depend, ${MAKECMDGOALS})) ifneq (,$(wildcard depend)) include depend endif endif install: ${EXEC} install -pv ${EXEC} ~/DouglasThrift.net/WWW/data/topsecret/auth/${EXEC} clean: -${RM} ${OBJS} ${EXEC} core $(patsubst %, %.core, ${EXEC}) \ $(patsubst %, %.stackdump, ${EXEC}) depend