summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--lib/Makefile4
2 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index ed5a186..b22b5f0 100644
--- a/Makefile
+++ b/Makefile
@@ -26,15 +26,15 @@ VERSION := 0.4.0
# library abi version
SOVERSION := 0
-all: libcqrlogo cqrlogo.cgi cqrlogo.fcgi README.html cqrlogo.png
+all: lib/libcqrlogo.so cqrlogo.cgi cqrlogo.fcgi README.html cqrlogo.png
-libcqrlogo: lib/libcqrlogo.c lib/libcqrlogo.h config.h version.h
+lib/libcqrlogo.so: lib/libcqrlogo.c lib/libcqrlogo.h config.h version.h
SOVERSION=$(SOVERSION) $(MAKE) -C lib
-cqrlogo.cgi: libcqrlogo cqrlogo.c cqrlogo.h config.h version.h
+cqrlogo.cgi: lib/libcqrlogo.so cqrlogo.c cqrlogo.h config.h version.h
$(CC) -lcqrlogo -Llib/ -Ilib/ $(LDFLAGS) -DHAVE_FCGI=0 -o cqrlogo.cgi cqrlogo.c
-cqrlogo.fcgi: libcqrlogo cqrlogo.c cqrlogo.h config.h version.h
+cqrlogo.fcgi: lib/libcqrlogo.so cqrlogo.c cqrlogo.h config.h version.h
$(CC) -lcqrlogo -Llib/ -Ilib/ -lfcgi $(LDFLAGS) -DHAVE_FCGI=1 -o cqrlogo.fcgi cqrlogo.c
version.h: $(wildcard .git/HEAD .git/index .git/refs/tags/*) Makefile
@@ -55,7 +55,7 @@ cqrlogo.png: cqrlogo.cgi
install: install-bin install-config install-doc
-install-bin: libcqrlogo lib/libcqrlogo.h cqrlogo.cgi cqrlogo.fcgi cqrlogo.conf
+install-bin: lib/libcqrlogo.so lib/libcqrlogo.h cqrlogo.cgi cqrlogo.fcgi cqrlogo.conf
$(INSTALL) -D -m0755 lib/libcqrlogo.so.$(SOVERSION) $(DESTDIR)$(PREFIX)/lib/libcqrlogo.so.$(SOVERSION)
$(INSTALL) -D -m0755 lib/libcqrlogo.h $(DESTDIR)$(PREFIX)/include/libcqrlogo.h
$(LN) -sf libcqrlogo.so.$(SOVERSION) $(DESTDIR)$(PREFIX)/lib/libcqrlogo.so
diff --git a/lib/Makefile b/lib/Makefile
index d6a33af..b4bf444 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -8,9 +8,9 @@ CFLAGS += $(shell pkg-config --cflags --libs libpng)
CFLAGS += $(shell pkg-config --cflags --libs zlib)
CFLAGS += $(shell pkg-config --cflags --libs libqrencode)
-all: libcqrlogo
+all: libcqrlogo.so
-libcqrlogo: libcqrlogo.c libcqrlogo.h ../config.h ../version.h
+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
$(LN) -sf libcqrlogo.so.$(SOVERSION) libcqrlogo.so