#####################################################################
# This is the filesystem makefile "make_BuddyAlloc".
# Author:Michael Gomes
# Date:14 jan 2011
######################################################################

#variable defination
CC = gcc
CFLAGS = -g -O2
SRC_DIR=src
INC_DIR=inc
OBJ_DIR=obj

#List of source files 
SOURCE= buddyMain.c \
		Copy.c \
		
		
#List of object files 
OBJECTS=$(addprefix $(OBJ_DIR)/,$(SOURCE:.c=.o))
	
#BuddyAlloc is dependent on "obj/*.o".
BuddyAlloc : $(OBJECTS)
	$(CC) $(CFLAGS) -o BuddyAlloc $<

#obj/*.o depends on src/*.c and inc/*.h, we are redirecting the object files to obj folder
$(OBJECTS):$(SRC_DIR)/$(SOURCE)  
	$(CC) $(CFLAGS) -I$(INC_DIR) -o $(OBJ_DIR)/$(OBJECTS) -c $<
	

#Cleans all the *.exe files
clean:
	rm -f *.exe

