zint/frontend/Makefile.mingw

38 lines
970 B
Makefile
Raw Normal View History

# 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
#
ZINT_VERSION:=-DZINT_VERSION=\"2.1.3\"
CC := gcc
CFLAGS := -D_WIN32 -O2 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -Wall
prefix := /mingw
bindir := $(prefix)/bin
DESTDIR :=
all: zint zint_static
%.res:%.rc
windres -O coff --input-format=rc -i $< -o $@
zint: main.c zint.res
$(CC) $(CFLAGS) -DZINT_DLL -DQRENCODE_DLL -DPNG_DLL -DZLIB_DLL $(ZINT_VERSION) $? zint.res -o $@ -lzint
zint_static: main.c zint.res
$(CC) -static $(CFLAGS) $(ZINT_VERSION) $? zint.res -o $@ -lzint -lqrencode -lpng -lz
.PHONY: install uninstall clean dist
clean:
rm -f zint *.o *.a *~ *.png *.eps *.svg *.log *.exe *.bak *.res
install:
install -D -p zint $(DESTDIR)$(bindir)/zint
uninstall:
rm $(DESTDIR)$(bindir)/zint