diff options
author | Camil Staps | 2017-01-31 23:15:28 +0100 |
---|---|---|
committer | Camil Staps | 2017-01-31 23:15:28 +0100 |
commit | 631204a1feffa8cf3795060370b14dfb9f53f533 (patch) | |
tree | 001d32e0157127607f7c088881f098c2eca841a1 /Makefile |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ab291b --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +CC:=xc8 +CFLAGS:=-I. --chip=16F1778 -Q -Wall + +SRC:=logger.c spi.c sd.c ff.c diskio.c uart.c util.c dac.c +DEP:=spi.h sd.h ff.h diskio.h integer.h uart.h logger.h util.h dac.h +PRS:=$(subst .c,.p1,$(SRC)) +OBJ:=logger.hex + +all: $(OBJ) + +$(OBJ): $(PRS) + $(CC) $(CFLAGS) $^ + +$(PRS): %.p1: %.c $(DEP) + $(CC) $(CFLAGS) -o$@ --pass1 $< + +clean: + $(RM) all.cof $(addprefix startup.,as lst obj rlf)\ + $(foreach s,$(SRC),$(addprefix $(subst .c,.,$(s)), as cmf cof d hex hxl lst obj p1 pre rlf sdb sym)) |