summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 0000000..47f4db7
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,21 @@
+# cqrlogo - CGI QR-Code logo for web services
+
+CC := gcc
+LN := ln
+CFLAGS += -O2 -Wall -Werror
+CFLAGS += -liniparser
+CFLAGS += $(shell pkg-config --cflags --libs libpng)
+CFLAGS += $(shell pkg-config --cflags --libs zlib)
+CFLAGS += $(shell pkg-config --cflags --libs libqrencode)
+
+# library abi version
+SOVERSION := 0
+
+all: libcqrlogo
+
+libcqrlogo: 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
+
+clean:
+ $(RM) -f *.o *~ libcqrlogo.so libcqrlogo.so.*