2010-03-02 11:34:35 +13:00
|
|
|
# Linux makefile for zint - requires libzint
|
|
|
|
#
|
|
|
|
# make compiles zint
|
|
|
|
# make install copies binary to /usr/local/bin
|
|
|
|
# make uninstall removes the binary
|
|
|
|
# make clean cleans up a previous compilation and any object or editor files
|
|
|
|
#
|
|
|
|
|
2013-01-01 02:41:42 +13:00
|
|
|
ZINT_VERSION:=-DZINT_VERSION=\"2.4.4\"
|
2010-03-02 11:34:35 +13:00
|
|
|
|
|
|
|
CC := gcc
|
2010-03-04 20:38:47 +13:00
|
|
|
INCLUDE := -I/usr/include
|
2010-03-02 11:34:35 +13:00
|
|
|
CFLAGS := -g
|
|
|
|
|
2010-03-04 20:38:47 +13:00
|
|
|
prefix := /usr
|
2010-03-02 11:34:35 +13:00
|
|
|
bindir := $(prefix)/bin
|
|
|
|
DESTDIR :=
|
2013-01-11 02:49:04 +13:00
|
|
|
LIBS:= -lz -lm -lpng
|
2010-03-02 11:34:35 +13:00
|
|
|
|
2013-01-11 02:49:04 +13:00
|
|
|
all: zint zint-static
|
|
|
|
|
|
|
|
main.o: main.c
|
|
|
|
$(CC) -c -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend main.c -o main.o
|
|
|
|
|
|
|
|
zint: main.o
|
|
|
|
$(CC) -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend -L../backend main.o -o zint -lzint
|
|
|
|
|
|
|
|
zint-static: main.c
|
|
|
|
$(CC) -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend main.o -o zint-static ../backend/libzint.a $(LIBS)
|
2010-03-02 11:34:35 +13:00
|
|
|
|
|
|
|
.PHONY: install uninstall clean dist
|
|
|
|
|
|
|
|
clean:
|
2013-01-11 02:49:04 +13:00
|
|
|
rm -f zint zint-static *.o *.a *~ *.png *.eps *.svg *.log
|
2010-03-02 11:34:35 +13:00
|
|
|
|
|
|
|
install:
|
|
|
|
install -D -p zint $(DESTDIR)$(bindir)/zint
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm $(DESTDIR)$(bindir)/zint
|