# Makefile #

# Variable definition
CC=gcc -g
MIG=mig -n
INCLUDE_DIR=include
PROG=test

all:  
	$(MIG) $(INCLUDE_DIR)/mach_debug/mach_debug.defs -header $(INCLUDE_DIR)/mach_debug/mach_debug.h -user $(INCLUDE_DIR)/mach_debug/mach_debugUser.c
	$(CC) -I$(INCLUDE_DIR) -c $(INCLUDE_DIR)/mach_debug/mach_debugUser.c
	$(CC) -o $(PROG) -I$(INCLUDE_DIR) mach_debugUser.o query_mach_debug.c
	rm mach_debugUser.o
	rm $(INCLUDE_DIR)/mach_debug/mach_debug.h $(INCLUDE_DIR)/mach_debug/mach_debugUser.c

clean:
	rm mach_debugUser.o $(PROG)
	rm $(INCLUDE_DIR)/mach_debug/mach_debug.h $(INCLUDE_DIR)/mach_debug/mach_debugUser.c
