aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Makefile b/lib/Makefile
index b4bf444..93cd374 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -10,9 +10,15 @@ CFLAGS += $(shell pkg-config --cflags --libs libqrencode)
all: libcqrlogo.so
-libcqrlogo.so: libcqrlogo.c libcqrlogo.h ../config.h ../version.h
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -fPIC -Wl,-soname,libcqrlogo.so.$(SOVERSION) -o libcqrlogo.so.$(SOVERSION) libcqrlogo.c
+libcqrlogo.o: libcqrlogo.c libcqrlogo.h ../config.h ../version.h Makefile
+ $(CC) -c $(CFLAGS) $(LDFLAGS) -fPIC -o libcqrlogo.o libcqrlogo.c
+
+libcqrlogo.so: libcqrlogo.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -fPIC -Wl,-soname,libcqrlogo.so.$(SOVERSION) -o libcqrlogo.so.$(SOVERSION) libcqrlogo.o
$(LN) -sf libcqrlogo.so.$(SOVERSION) libcqrlogo.so
clean:
- $(RM) -f *.o *~ libcqrlogo.so libcqrlogo.so.*
+ $(RM) -f libcqrlogo.o libcqrlogo.so libcqrlogo.so.*
+
+distclean:
+ $(RM) -f *~ libcqrlogo.o libcqrlogo.so libcqrlogo.so.*