# Makefile for word frequency analysis program

CC = icx
#CFLAGS = -O2 -pg
CFLAGS = -Ofast -Wall
TARGET = prog
SOURCES = prog.c options.c

all: $(TARGET)

$(TARGET): $(SOURCES)
	$(CC) $(CFLAGS) $(SOURCES) -o $(TARGET)

run: $(TARGET)
	./$(TARGET) -file shakespeare.txt

profile: $(TARGET)
	./$(TARGET) -file shakespeare.txt
	gprof $(TARGET)

clean:
	rm -f $(TARGET) gmon.out

.PHONY: all run profile clean
