# Makefile for building 1KB-USB CDC serial port

CHIP = p18f4450

# set primary build objects
ALL = 1kcdc

INCLUDES = usb-devices.inc jdlib.inc

# build targets
targets:
	@echo "Mupen64amd64-RiceVideoLinux release makefile. "
	@echo "  Targets:"
	@echo "    all       == Build Mupen64 and RiceVideo source zips, plus 32-bit and 64-bit binary zips"
	@echo "    src-m64   == build Mupen64-amd64 source package (zip format)"
	@echo "    src-rvl   == build RiceVideoLinux source package (zip format)"
	@echo "    bin-32    == build 32-bit binary package (zip format)"
	@echo "    bin-64    == build 64-bit binary package (zip format)"
	@echo "  Options:"
	@echo "    VER=<ver> == (required) Sets version number of build (VER=1.0.3)"

all: $(ALL)

1kcdc:	1kcdc.hex

%.hex:	%.asm $(INCLUDES)
	gpasm -p $(CHIP) -y $<

program:	1kcdc
	pk2cmd -P -F 1kcdc.hex -M

clean:
	rm *.cod
	rm *.hex
	rm *.lst
