summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-02-06 17:26:41 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-02-06 17:26:41 +0100
commit70d3f132f12423a43ee5454f747f58fdde4dfb8e (patch)
treef8be3d0ccaeea6728abe62ec8e41544c3c74a44b /Makefile
Initial import, still work in progress
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7bc8857
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+# Makefile for llmnrd
+#
+# Copyright (C) 2014-2015 Tobias Klauser <tklauser@distanz.ch>
+
+P = llmnrd
+OBJS = llmnr.o iface.o socket.o util.o main.o
+LIBS = -lpthread
+
+CC = $(CROSS_COMPILE)gcc
+
+CFLAGS ?= -W -Wall -O2
+LDFLAGS ?=
+
+CCQ = @echo -e " CC\t$<" && $(CC)
+LDQ = @echo -e " LD\t$@" && $(CC)
+
+all: $(P)
+
+$(P): $(OBJS)
+ $(LDQ) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+%.o: %.c %.h
+ $(CCQ) $(CFLAGS) -o $@ -c $<
+
+%.o: %.c
+ $(CCQ) $(CFLAGS) -o $@ -c $<
+
+clean:
+ @echo -e " CLEAN"
+ @rm -f $(OBJS) $(P)