summaryrefslogtreecommitdiff
path: root/util/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'util/Makefile')
-rw-r--r--util/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/util/Makefile b/util/Makefile
new file mode 100644
index 0000000..f40aac2
--- /dev/null
+++ b/util/Makefile
@@ -0,0 +1,25 @@
+CFLAGS = -I/usr/local/include/libftdi1
+LDFLAGS = -lftdi1
+TARGETS = prog switch upload term
+
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $<
+
+all: $(TARGETS)
+
+prog: prog.o
+ $(CC) -o $@ $< $(LDFLAGS)
+
+switch: switch.o
+ $(CC) -o $@ $< $(LDFLAGS)
+
+term: term.o tty.o
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+upload: upload.o tty.o
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+clean:
+ rm -f *.o
+ rm -f $(TARGETS)