# Specify the compiler
CC=gcc

# Give any optional flags 
# (-g turns on debugging symbols, and -Wall turns on most compiler warnings)
#FLAGS=
FLAGS=-g -Wall

# List of things we want to "#define" via command line
DEFINES=-DPRINT_INPUT -DPRINT_EVENT_LIST -DPRINT_STATS -DSCHEDULER_OVERHEAD=0.0

# Compiles the scheduling code into an object file
fcfs: scheduler_fcfs.c
	$(CC) $(FLAGS) $(DEFINES) -c scheduler_fcfs.c

# Compiles the simulator and links it with the scheduler to create
# the final compiled output "simfcfs". Note that it explicitly depends on 
# the target "fcfs"
simfcfs: fcfs scheduler_simulation.c
	$(CC) $(FLAGS) $(DEFINES) -o simfcfs scheduler_fcfs.o scheduler_simulation.c

# Clean up the directory by removing object files, compiled output, and 
# editor backups
clean:
	rm *.o *~ simfcfs 