diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
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) |