Add Makefile
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sun, 24 Jan 2016 20:56:33 +0000 (21:56 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sun, 24 Jan 2016 20:56:33 +0000 (21:56 +0100)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..4b430be
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+CC ?= gcc
+CFLAGS = -Wall
+
+nmrpd: nmrp.o tftp.o main.o
+       $(CC) $(CFLAGS) -o nmrpd nmrp.o tftp.o main.o
+
+nmrp.o: nmrp.c nmrpd.h
+       $(CC) $(CFLAGS) -c -o nmrp.o nmrp.c
+
+tftp.o: tftp.c nmrpd.h
+       $(CC) $(CFLAGS) -c -o tftp.o tftp.c
+
+main.o: main.c nmrpd.h
+       $(CC) $(CFLAGS) -c -o main.o main.c
+
+clean:
+       rm -f nmrp.o tftp.o main.o nmrpd
+