diff --git a/.gitignore b/.gitignore index 5f82de9..d77864a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,2 @@ -*~ -*.swp - -*.eep -*.elf -*.hex -*.map -*.o -*.o.dep +*.zip diff --git a/makefile b/makefile new file mode 100644 index 0000000..4372346 --- /dev/null +++ b/makefile @@ -0,0 +1,53 @@ +# ----------------------------------------------------------------------------- +# makefile for the ergoDOX project +# +# This should produce a single file (probably in an archive format) for +# distribution, containing everything people will need to use the software. +# +# AVAILABILITY: This is unabashedly dependant on various Unix commands, and +# therefore probably won't work in a Windows environment. I'm sorry. I don't +# know a good portable way to write it. +# +# TODO: +# - include doc files (and maybe render them in html) +# - include the UI stuff (once it's done) +# ----------------------------------------------------------------------------- +# Copyright (c) 2012 Ben Blazak +# Released under The MIT License (MIT) (see "license.md") +# Project located at +# ----------------------------------------------------------------------------- + + +# the base name of the file or package to distribute +NAME := ergodox-firmware +# the branch of the git repo we're currently on +BRANCH := $(shell git branch -l | grep '*' | cut -c 3-) +# a version identifier +VERSION := $(shell date +'%Y%m%d_%H%M%S') + +# name to use for the final distribution file or package +TARGET = $(NAME)--$(BRANCH)--$(VERSION) + +# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + +.PHONY: all clean dist + +all: dist + +clean: + git clean -dX # remove ignored files and directories + +dist: src contrib/UI + +# ----------------------------------------------------------------------------- + +.PHONY: src contrib/UI + +src: + cd src; $(MAKE) all + zip '$(TARGET)' src/*.hex src/*.elf src/*.map + +contrib/UI: + # nothing yet + diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..ec1ee50 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,7 @@ +*.eep +*.elf +*.hex +*.map +*.o +*.o.dep + diff --git a/src/makefile b/src/makefile index 367fa3e..07e03ee 100644 --- a/src/makefile +++ b/src/makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# makefile for the ergoDOX project +# makefile for the ergoDOX firmware # # - .h file dependencies are automatically generated # @@ -122,17 +122,7 @@ all: $(TARGET).hex $(TARGET).eep clean: @echo @echo --- cleaning --- - cd .. ; git clean -dX # remove ignored files and directories - -# availability: linux -dist: clean all - name='ergodox-firmware'; \ - branch='$(shell git branch -l | grep '*' | cut -c 3-)'; \ - date='$(shell date +'%Y%m%d_%H%M%S')'; \ - \ - zip "$$name--$$branch--$$date.zip" "$(TARGET).hex" "$(TARGET).map"; \ - \ - make clean + git clean -dX # remove ignored files and directories # -----------------------------------------------------------------------------