TARGET = runme # name of the executable SRC = $(wildcard *.C) # # collect the source code *.cc OBJ = $(patsubst %.C,%.o,$(SRC)) # # figure out the object names *.o CC = g++ # # name of the compiler CFLAGS = -O4 # # compile options LFLAGS = # # link options $(TARGET): $(OBJ) # rule to link $(CC) -o $(TARGET) $(LFLAGS) $(OBJ) %.o:%.C # rule to compile $(CC) $(CFLAGS) -c $< indent -br $< clean: rm *.o; rm $(TARGET); rm *.bak # use this to clean up makefile: $(SRC) # this will automatically create the dependencies makedepend $(SRC) &> /dev/null # DO NOT DELETE