1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CC=g++ CFLAGS=-c -Wall LDFLAGS= SOURCES=main.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=tsak all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ .cpp.o: $(CC) $(CFLAGS) $< -o $@