summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2011-11-14 22:36:21 -0700
committerJohn Rigby <john.rigby@linaro.org>2011-11-14 22:36:21 -0700
commit27d77171a1b9f0caa60bd8aa310381bacaadf054 (patch)
tree7719217514886b1cd17882e616f79bbda1bee80f /Makefile
Initial commitv0.1
Signed-off-by: John Rigby <john.rigby@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..86ea1cd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+CFLAGS = -g -O2 -Wall
+
+prog = usbboot
+
+all: $(prog)
+
+install: all
+ install -d $(DESTDIR)/usr/bin
+ install $(prog) $(DESTDIR)/usr/bin
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@ -MD -MT $@ -MF $(@:%o=%d)
+
+objs = usbboot.o usb_linux.o
+
+
+$(prog): $(objs)
+ $(CC) $(CFLAGS) -o $@ $(objs)
+
+clean:
+ rm -rf $(prog) $(objs) $(deps)
+
+deps = $(objs:%o=%d)
+
+-include $(deps)
+