From ea59bedc93acbdfc1d8b7b230e1348b038a039a7 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Fri, 21 Jul 2017 18:55:02 -0400 Subject: [PATCH] Reordered definition and added comment to C makefile. --- c/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/c/Makefile b/c/Makefile index 6340c67..1e7d28f 100644 --- a/c/Makefile +++ b/c/Makefile @@ -61,13 +61,14 @@ all: $(MAINS) clean: rm -f -- $(MAINS) libqrcodegen.so +# Shared library +libqrcodegen.so: $(LIBSRC:=.c) $(LIBSRC:=.h) + $(CC) $(CFLAGS) -fPIC -shared -o $@ $< + # Executable files %: %.c $(LIBSRC:=.c) $(LIBSRC:=.h) $(CC) $(CFLAGS) -o $@ $< $(LIBSRC:=.c) -libqrcodegen.so: $(LIBSRC:=.c) $(LIBSRC:=.h) - $(CC) $(CFLAGS) -fPIC -shared -o $@ $< - # Special executable qrcodegen-test: qrcodegen-test.c $(LIBSRC:=.c) $(LIBSRC:=.h) $(CC) $(CFLAGS) -DQRCODEGEN_TEST -o $@ $< $(LIBSRC:=.c)