summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorDavid Blajda <blajda@hotmail.com>2017-10-17 19:38:10 -0400
committerDavid Blajda <blajda@hotmail.com>2017-10-17 19:38:10 -0400
commitee820891c9f9c7db8aa5ea2ae24a71e1a3c16b31 (patch)
treeb99ef25a8e165f29d1efdf5c3faacd50f78c64f2 /makefile
Initailize repository
Diffstat (limited to 'makefile')
-rw-r--r--makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..ee700e1
--- /dev/null
+++ b/makefile
@@ -0,0 +1,20 @@
+CC=gcc
+CFLAGS=-std=c99 -I.
+
+all: example
+
+example: burstExample rwExample
+
+rwExample: ds1302
+ $(CC) $(CFLAGS) examples/readwrite.c ds1302.o -l bcm2835 -o rwExample
+
+burstExample: ds1302
+ $(CC) $(CFLAGS) examples/burst.c ds1302.o -l bcm2835 -o burstExample
+
+ds1302:
+ $(CC) $(CFLAGS) -c ds1302.c
+
+clean: .PHONY
+ rm *.o burstExample rwExample
+
+.PHONY: