### Makefile  -*- Makefile -*-
## Build SPI to 3 SPI control module.

### Ivan Shmakov, 2020

## To the extent possible under law, the author(s) have dedicated
## all copyright and related and neighboring rights to this software
## to the public domain worldwide.  This software is distributed
## without any warranty.

## You should have received a copy of the CC0 Public Domain Dedication
## along with this software.  If not, see
## <http://creativecommons.org/publicdomain/zero/1.0/>.

### History

## 0.1 2020-03-14
##     Initial revision.

### Code:

srcdir  = .
VPATH   = $(srcdir)

MACHINE = gnu

.PHONY: all
all: threespi

include $(srcdir)/Makefile.$(MACHINE)

## FIXME: looks somewhat messier than necessary
CFLAGS_1    = -std=gnu11 -Wall -pedantic -O2 -g
CPPFLAGS_RDY    = -DREADYLED_DELAY="(2 * 4)" -DREADYLED_PAUSE="(-3 * 4)" \
                  -DREADYLED_PORT_INVERSE=0
CPPFLAGS_INC    = -I$(srcdir) -I$(srcdir)/include
CPPFLAGS_1      = $(CPPFLAGS_INC) $(CPPFLAGS_RDY)

threespi: threespi.o
threespi.o: threespi.c machine.h include/readyled.h

### Makefile ends here
