C++ = g++ # use GNU C++ compiler C++-FLAGS = -c -Wall # warn all LINKER = g++ # use GNU C++ as linker LINKER-FLAGS = -o # flags for linker RM = rm -f # how to remove files MAKE = make # name of make utility # you cannot add comments after the continuation character! OBJS = input.o \ mirror.o \ process.o \ output.o TARGET = mirror # name of executable .IGNORE: # ignore problems (as far as possible) .SILENT: # don't echo commands executed .SUFFIXES: # get rid of predefined rules .SUFFIXES: .cc .o $(TARGET): $(OBJS) $(LINKER) $(LINKER-FLAGS) $@ $(OBJS) .cc.o: $(C++) $(C++-FLAGS) $< # remove object files and core (if any) clean: $(RM) *.o core # remove object files, core dump, and executable (if any) distclean: $(MAKE) clean $(RM) $(TARGET) # remove object files, core dump, and executable (if any) and # make them again. again: $(MAKE) distclean $(MAKE) $(TARGET) # echo username info: echo User is: $(USER)