mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
patch by Till Maas
This commit is contained in:
parent
cde11c130c
commit
126d3a71e1
@ -9,41 +9,49 @@
|
|||||||
|
|
||||||
CC := gcc
|
CC := gcc
|
||||||
INCLUDE := -I/usr/local/include
|
INCLUDE := -I/usr/local/include
|
||||||
|
CFLAGS := -g
|
||||||
|
|
||||||
|
prefix := /usr/local
|
||||||
|
includedir := $(prefix)/include
|
||||||
|
libdir := $(prefix)/lib
|
||||||
|
DESTDIR :=
|
||||||
|
|
||||||
COMMON:= common.c png.c library.c ps.c large.c reedsol.c
|
COMMON:= common.c png.c library.c ps.c large.c reedsol.c
|
||||||
COMMON_OBJ:= common.o png.o library.o ps.o large.o reedsol.o
|
COMMON_OBJ:= common.o png.o library.o ps.o large.o reedsol.o
|
||||||
ONEDIM:= code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c
|
ONEDIM:= code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c
|
||||||
ONEDIM_OBJ:= code.o code128.o 2of5.o upcean.o telepen.o medical.o plessey.o rss.o
|
ONEDIM_OBJ:= code.o code128.o 2of5.o upcean.o telepen.o medical.o plessey.o rss.o
|
||||||
POSTAL:= postal.c auspost.c imail.c
|
POSTAL:= postal.c auspost.c imail.c
|
||||||
POSTAL_OBJ:= postal.o auspost.o imail.o
|
POSTAL_OBJ:= postal.o auspost.o imail.o
|
||||||
TWODIM:= code16k.c dmatrix.c dm200.c pdf417.c maxicode.c composite.c
|
TWODIM:= code16k.c dmatrix.c dm200.c pdf417.c qr.c maxicode.c composite.c aztec.c
|
||||||
TWODIM_OBJ:= code16k.o dmatrix.o dm200.o pdf417.o maxicode.o composite.o
|
TWODIM_OBJ:= code16k.o dmatrix.o dm200.o pdf417.o qr.o maxicode.o composite.o aztec.o
|
||||||
LIBS:= `libpng12-config --I_opts --L_opts --ldflags` -lz -lm
|
LIBS:= `libpng12-config --I_opts --L_opts --ldflags` -lz -lm
|
||||||
|
|
||||||
libzint: code.c code128.c 2of5.c upcean.c medical.c telepen.c plessey.c postal.c auspost.c imail.c code16k.c dmatrix.c dm200.c reedsol.c pdf417.c maxicode.c rss.c common.c png.c library.c ps.c qr.c large.c composite.c
|
ifeq ($(WITHOUT_QR),true)
|
||||||
$(CC) -fPIC -g -c $(ONEDIM)
|
DEFINES:=
|
||||||
$(CC) -fPIC -g -c $(POSTAL)
|
else
|
||||||
$(CC) -fPIC -g -c $(TWODIM) qr.c
|
DEFINES:= -DWITH_QR
|
||||||
$(CC) -fPIC -g -c $(COMMON)
|
LIBS+= -lqrencode
|
||||||
$(CC) -g -shared -Wl,-soname,libzint.so -o libzint.so.1.6.0 $(INCLUDE) $(COMMON_OBJ) $(ONEDIM_OBJ) $(TWODIM_OBJ) qr.o $(POSTAL_OBJ) $(LIBS) -lqrencode
|
endif
|
||||||
|
|
||||||
libzint_noqr: code.c code128.c 2of5.c upcean.c medical.c telepen.c plessey.c postal.c auspost.c imail.c code16k.c dmatrix.c dm200.c reedsol.c pdf417.c maxicode.c rss.c common.c png.c library.c ps.c no_qr.c large.c composite.c
|
libzint: code.c code128.c 2of5.c upcean.c medical.c telepen.c plessey.c postal.c auspost.c imail.c code16k.c dmatrix.c dm200.c reedsol.c pdf417.c maxicode.c rss.c common.c png.c library.c ps.c qr.c large.c composite.c aztec.c
|
||||||
$(CC) -fPIC -g -c $(ONEDIM)
|
$(CC) -fPIC $(CFLAGS) -c $(ONEDIM)
|
||||||
$(CC) -fPIC -g -c $(POSTAL)
|
$(CC) -fPIC $(CFLAGS) -c $(POSTAL)
|
||||||
$(CC) -fPIC -g -c $(TWODIM) no_qr.c
|
$(CC) -fPIC $(DEFINES) $(CFLAGS) -c $(TWODIM)
|
||||||
$(CC) -fPIC -g -c $(COMMON)
|
$(CC) -fPIC $(CFLAGS) -c $(COMMON)
|
||||||
$(CC) -g -shared -Wl,-soname,libzint.so -o libzint.so.1.6.0 $(INCLUDE) $(COMMON_OBJ) $(ONEDIM_OBJ) $(TWODIM_OBJ) no_qr.o $(POSTAL_OBJ) $(LIBS)
|
$(CC) $(CFLAGS) -shared -Wl,-soname,libzint.so -o libzint.so.1.6.3 $(INCLUDE) $(COMMON_OBJ) $(ONEDIM_OBJ) $(TWODIM_OBJ) $(POSTAL_OBJ) $(LIBS)
|
||||||
|
ln -s libzint.so.* libzint.so
|
||||||
|
|
||||||
.PHONY: install uninstall clean dist
|
.PHONY: install uninstall clean dist
|
||||||
|
|
||||||
install:
|
install:
|
||||||
ldconfig -n $(PWD)
|
test "$(UID)" = "0" && ldconfig -n $(PWD) || true
|
||||||
mv libzint.* /usr/local/lib
|
install -d $(DESTDIR)$(libdir)
|
||||||
cp zint.h /usr/local/include
|
mv libzint.* $(DESTDIR)$(libdir)
|
||||||
|
install -D -p --mode=0644 zint.h $(DESTDIR)$(includedir)/zint.h
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm /usr/local/lib/libzint.*
|
rm $(DESTDIR)$(libdir)libzint.*
|
||||||
rm /usr/local/include/zint.h
|
rm $(DESTDIR)$(includedir)/zint.h
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f libzint.* *.o *.a *~
|
rm -f libzint.* *.o *.a *~
|
||||||
|
Loading…
Reference in New Issue
Block a user