###############################################################################
# Makefile for project 
###############################################################################

## General options
PROJECT = 
MCU = PIC18F46K22
COMPILER = "MPLAB XC8"
TARGET = Debug
SHELL = C:\WINDOWS\system32\cmd.exe

## Tools general options
CCFLAGS=--pass1 --errformat="Error at file %%f line %%l column %%c: (%%n) %%s" --warnformat="Warning at file %%f line %%l column %%c: (%%n) %%s" --msgformat="Message at file %%f line %%l column %%c: (%%n) %%s" -G --chip=18F46K22
LDFLAGS=--output=mcof -G --chip=18F46K22

## Processing Tools
CC=xc8.exe
ASM=xc8.exe
LD=xc8.exe
LIB=xc8.exe
#  C:/Users/ISA06014278/Documents/0Files/BEng/Indpt Proj/Simulation/XC8/PIC18F46K22_2/Debug/Debug.cof: TOOL=LD
#  Post: rm startup.as
#  Post: rm Debug.as
#     C:/Users/ISA06014278/Documents/0Files/BEng/Indpt Proj/Simulation/XC8/PIC18F46K22_2/Debug/INTERR~1.p1: TOOL=CC
#        C:/Users/ISA06014278/Documents/0Files/BEng/Indpt Proj/Simulation/XC8/PIC18F46K22_2/interrupts.c
#     C:/Users/ISA06014278/Documents/0Files/BEng/Indpt Proj/Simulation/XC8/PIC18F46K22_2/Debug/main.p1: TOOL=CC
#        C:/Users/ISA06014278/Documents/0Files/BEng/Indpt Proj/Simulation/XC8/PIC18F46K22_2/main.c

# Build tree:
all:	Debug

Debug:	Debug.cof

Debug.cof:	INTERR~1.p1 main.p1 
	$(LD) $(LDFLAGS)  -O"Debug.cof" "INTERR~1.p1" "main.p1"
	rm startup.as
	rm Debug.as

INTERR~1.p1:	../interrupts.c 
	$(CC) $(CCFLAGS)  -O"INTERR~1.p1" "../interrupts.c"

main.p1:	../main.c 
	$(CC) $(CCFLAGS)  -O"main.p1" "../main.c"

# tidy - delete all temporary files which are not involved in the target generation
tidy:
	rm -rf Debug.hxl
	rm -rf Debug.lst
	rm -rf Debug.sym
	rm -rf Debug.obj
	rm -rf Debug.sdb
	rm -rf Debug.as
	rm -rf ./startup.obj
	rm -rf ./startup.rlf
	rm -rf ./startup.as
	rm -rf ./startup.lst
	rm -rf ./funclist.
	rm -rf Debug.hex
	rm -rf INTERR~1.pre
	rm -rf INTERR~1.lst
	rm -rf main.pre
	rm -rf main.lst

# cleanup - delete all generated files
clean:	tidy
	rm -rf Debug.cof
	rm -rf INTERR~1.p1
	rm -rf main.p1
