46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
.PHONY: bootloader
 | 
						|
bootloader:  ## Build the bootloader in docker
 | 
						|
	docker build -o . --target export --build-arg TARGET=bootloader.elf .
 | 
						|
 | 
						|
.PHONY: helloworld
 | 
						|
helloworld:  ## Build the helloworld app in docker
 | 
						|
	docker build -o . --target export --build-arg TARGET=helloworld.bin .
 | 
						|
 | 
						|
.PHONY: timer
 | 
						|
timer:  ## Build the timer app in docker
 | 
						|
	docker build -o . --target export --build-arg TARGET=timer.bin .
 | 
						|
 | 
						|
.PHONY: uart
 | 
						|
uart:  ## Build the uart app in docker
 | 
						|
	docker build -o . --target export --build-arg TARGET=uart.bin .
 | 
						|
 | 
						|
.PHONY: async
 | 
						|
async:  ## Build the async app in docker
 | 
						|
	docker build -o . --target export --build-arg TARGET=async.bin .
 | 
						|
 | 
						|
.PHONY: dev-image
 | 
						|
dev-image:
 | 
						|
	docker build -t mbv-dev --target dev .
 | 
						|
 | 
						|
.PHONY: dev
 | 
						|
dev: dev-image  ## Run a dev container
 | 
						|
	docker run -it --rm -v $(CURDIR):/workspace -w /workspace mbv-dev
 | 
						|
 | 
						|
.PHONY: precommit
 | 
						|
precommit:		## Make sure everything looks ok before pushing
 | 
						|
	$(MAKE) bootloader
 | 
						|
	$(MAKE) helloworld
 | 
						|
	$(MAKE) timer
 | 
						|
	$(MAKE) uart
 | 
						|
	$(MAKE) async
 | 
						|
 | 
						|
.PHONY: clean
 | 
						|
clean:  ## Remove generated files
 | 
						|
	rm -rf *.elf *.bin
 | 
						|
 | 
						|
.PHONY: help
 | 
						|
help:           ## Show this help
 | 
						|
	@echo Noteworthy targets:
 | 
						|
	@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
 | 
						|
.DEFAULT_GOAL := help
 |