mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-26 14:27:07 +00:00
45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
# MinGW makefile for zint - requires libzint
|
|
#
|
|
# make compiles zint
|
|
# make install copies binary to /usr/bin
|
|
# make uninstall removes the binary
|
|
# make clean cleans up a previous compilation and any object or editor files
|
|
#
|
|
|
|
ZINT_VERSION:=-DZINT_VERSION=\"2.4.1\"
|
|
|
|
CC := gcc -m32
|
|
CFLAGS := -O2 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -Wall -I../backend
|
|
prefix := /mingw
|
|
bindir := $(prefix)/bin
|
|
DESTDIR :=
|
|
|
|
ifeq ($(NO_PNG),true)
|
|
DEFINES+= -DNO_PNG
|
|
else
|
|
DEFINES_DLL+= -DPNG_DLL -DZLIB_DLL
|
|
LIBS+= -lpng -lz
|
|
endif
|
|
|
|
all: zint zint_static
|
|
|
|
%.res:%.rc
|
|
windres -v -F pe-i386 --define GCC_WINDRES -O coff --input-format=rc -i $< -o $@
|
|
|
|
zint: main.c zint.res
|
|
$(CC) $(CFLAGS) -DZINT_DLL $(DEFINES_DLL) $(ZINT_VERSION) $? zint.res -o $@ -L../backend -lzint.dll $(LIBS)
|
|
|
|
zint_static: main.c zint.res
|
|
$(CC) -static $(CFLAGS) $(ZINT_VERSION) $? zint.res -o $@ -L../backend -lzint $(LIBS)
|
|
|
|
.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
|