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

## General options
PROJECT = 
MCU = PIC18F14K50
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=18F14K50
LDFLAGS=--output=mcof -G --chip=18F14K50

## Processing Tools
CC=xc8.exe
ASM=xc8.exe
LD=xc8.exe
LIB=xc8.exe
#  C:/Users/ISA06016815/Documents/UNIVERSITY/Electronics_1/Assignment/T-Junction_Traffic_Lights/PIC18F14K50_1/Debug/Debug.cof: TOOL=LD
#  Post: rm startup.as
#  Post: rm Debug.as
#     C:/Users/ISA06016815/Documents/UNIVERSITY/Electronics_1/Assignment/T-Junction_Traffic_Lights/PIC18F14K50_1/Debug/main.p1: TOOL=CC
#        C:/Users/ISA06016815/Documents/UNIVERSITY/Electronics_1/Assignment/T-Junction_Traffic_Lights/PIC18F14K50_1/main.c
#     C:/Users/ISA06016815/Documents/UNIVERSITY/Electronics_1/Assignment/T-Junction_Traffic_Lights/PIC18F14K50_1/Debug/eeprom.p1: TOOL=CC
#        C:/Users/ISA06016815/Documents/UNIVERSITY/Electronics_1/Assignment/T-Junction_Traffic_Lights/PIC18F14K50_1/eeprom.c

# Build tree:
all:	Debug

Debug:	Debug.cof

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

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

eeprom.p1:	../eeprom.c 
	$(CC) $(CCFLAGS)  -O"eeprom.p1" "../eeprom.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 main.pre
	rm -rf main.lst
	rm -rf eeprom.pre
	rm -rf eeprom.lst

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