aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-09-09 12:38:27 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-09-09 12:38:27 +0200
commit750903c2014a04bcbca2c4463be67a422b443587 (patch)
tree97f729ad2131f70d242b1a3a16dc97de5526208a /lib
parent8e08071f6a23e0975746922420fa94cd4a4c3092 (diff)
downloadcqrlogo-750903c2014a04bcbca2c4463be67a422b443587.tar.gz
cqrlogo-750903c2014a04bcbca2c4463be67a422b443587.tar.zst
allow to build binaries statically linked against libcqrlogo
Diffstat (limited to 'lib')
-rw-r--r--lib/.gitignore1
-rw-r--r--lib/Makefile12
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/.gitignore b/lib/.gitignore
index 6842a0a..14d8bbb 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -1,2 +1,3 @@
+libcqrlogo.o
libcqrlogo.so
libcqrlogo.so.*
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.*