summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
blob: 93cd37413cbd6efacb8cbac8319acf7c0641300c (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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)

all: libcqrlogo.so

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 libcqrlogo.o libcqrlogo.so libcqrlogo.so.*

distclean:
	$(RM) -f *~ libcqrlogo.o libcqrlogo.so libcqrlogo.so.*