|
Packit |
78deda |
ifeq ($(SRCDIR)x,x)
|
|
Packit |
78deda |
SRCDIR = $(CURDIR)/../..
|
|
Packit |
78deda |
BUILDDIR = $(SRCDIR)
|
|
Packit |
78deda |
endif
|
|
Packit |
78deda |
SUBDIR = converter/pbm
|
|
Packit |
78deda |
VPATH=.:$(SRCDIR)/$(SUBDIR)
|
|
Packit |
78deda |
|
|
Packit |
78deda |
include $(BUILDDIR)/config.mk
|
|
Packit |
78deda |
|
|
Packit |
78deda |
PORTBINARIES = atktopbm brushtopbm cistopbm cmuwmtopbm \
|
|
Packit |
78deda |
ddbugtopbm g3topbm escp2topbm \
|
|
Packit |
78deda |
macptopbm mdatopbm mgrtopbm mrftopbm \
|
|
Packit |
78deda |
pbmto10x pbmto4425 pbmtoascii pbmtoatk \
|
|
Packit |
78deda |
pbmtobbnbg pbmtocis pbmtocmuwm pbmtodjvurle \
|
|
Packit |
78deda |
pbmtoepsi pbmtoepson pbmtoescp2 \
|
|
Packit |
78deda |
pbmtog3 pbmtogem pbmtogo pbmtoibm23xx pbmtosunicon pbmtolj \
|
|
Packit |
78deda |
pbmtoln03 pbmtolps \
|
|
Packit |
78deda |
pbmtomacp pbmtomatrixorbital pbmtomda pbmtomgr pbmtomrf \
|
|
Packit |
78deda |
pbmtonokia \
|
|
Packit |
78deda |
pbmtopi3 pbmtoplot pbmtopsg3 pbmtoptx pbmtowbmp \
|
|
Packit |
78deda |
pbmtoxbm pbmtoybm pbmtozinc \
|
|
Packit |
78deda |
pi3topbm pktopbm \
|
|
Packit |
78deda |
wbmptopbm xbmtopbm ybmtopbm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
ifneq ($(LEX)x,x)
|
|
Packit |
78deda |
PORTBINARIES += thinkjettopbm
|
|
Packit |
78deda |
endif
|
|
Packit |
78deda |
|
|
Packit |
78deda |
#pbmpage uses sqrt(), which is sometimes in libc, not libm. Is it ever
|
|
Packit |
78deda |
#in libm?
|
|
Packit |
78deda |
MATHBINARIES = pbmtopk
|
|
Packit |
78deda |
BINARIES = $(PORTBINARIES) $(MATHBINARIES)
|
|
Packit |
78deda |
SCRIPTS = pbmtox10bm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
OBJECTS = $(BINARIES:%=%.o)
|
|
Packit |
78deda |
|
|
Packit |
78deda |
MERGEBINARIES = $(BINARIES)
|
|
Packit |
78deda |
MERGE_OBJECTS = $(MERGEBINARIES:%=%.o2)
|
|
Packit |
78deda |
|
|
Packit |
78deda |
SUBDIRS=pbmtoppa
|
|
Packit |
78deda |
|
|
Packit |
78deda |
.PHONY: all
|
|
Packit |
78deda |
all: $(BINARIES) $(SUBDIRS:%=%/all)
|
|
Packit |
78deda |
|
|
Packit |
78deda |
include $(SRCDIR)/common.mk
|
|
Packit |
78deda |
|
|
Packit |
78deda |
ifneq ($(LEX)x,x)
|
|
Packit |
78deda |
thinkjettopbm.c1:%.c1:%.l
|
|
Packit |
78deda |
$(LEX) -t $< >$@
|
|
Packit |
78deda |
endif
|
|
Packit |
78deda |
|
|
Packit |
78deda |
thinkjettopbm.c:%.c:%.c1 $(SRCDIR)/lib/util/lexheader
|
|
Packit |
78deda |
# Different versions of Lex produce subtly different output, from the
|
|
Packit |
78deda |
# same .l source file. The .c1 file contains the raw output from Lex.
|
|
Packit |
78deda |
# We now massage it so it will compile. We must add some definitions
|
|
Packit |
78deda |
# at the top (the lexheader file). We must remove any yylex and
|
|
Packit |
78deda |
# yywrap prototype, as our .l file already contains one. The Lex
|
|
Packit |
78deda |
# version "Software Generation Utilities (SGU) Solaris-ELF (4.0)"
|
|
Packit |
78deda |
# puts declarations for yylex and yywrap, as external symbols,
|
|
Packit |
78deda |
# into its output, causing a duplicate declaration error at compile time.
|
|
Packit |
78deda |
#
|
|
Packit |
78deda |
# Schwarb Manfred reports that it compiles OK, but with warnings, on
|
|
Packit |
78deda |
# Solaris. Solaris Lex has a -e option that eliminates the lex
|
|
Packit |
78deda |
# warnings, but causes compiler warnings. AIX and Flex don't have a
|
|
Packit |
78deda |
# -e option. -Bryan 2001.05.16.
|
|
Packit |
78deda |
#
|
|
Packit |
78deda |
# But Peter Weisz reported on 2002.12.11 that on Solaris, compile
|
|
Packit |
78deda |
# failed due to a duplicate declaration of yylex and yywrap with Netpbm
|
|
Packit |
78deda |
# 10.12, which does not remove those declarations as the current version
|
|
Packit |
78deda |
# does.
|
|
Packit |
78deda |
cat $(SRCDIR)/lib/util/lexheader $< | \
|
|
Packit |
78deda |
grep -v "^[[:space:]]*int yylex(void);" | \
|
|
Packit |
78deda |
grep -v "^[[:space:]]*int yywrap(void);" \
|
|
Packit |
78deda |
>$@
|
|
Packit |
78deda |
|
|
Packit |
78deda |
install.bin: install.bin.local
|
|
Packit |
78deda |
.PHONY: install.bin.local
|
|
Packit |
78deda |
install.bin.local: $(PKGDIR)/bin
|
|
Packit |
78deda |
# Remember that $(SYMLINK) might just be a copy command.
|
|
Packit |
78deda |
# In December 2010 (Actually January 2011), pbmtosunicon replaced pbmtoicon
|
|
Packit |
78deda |
cd $(PKGDIR)/bin ; \
|
|
Packit |
78deda |
$(SYMLINK) pbmtosunicon$(EXE) pbmtoicon$(EXE)
|
|
Packit |
78deda |
|
|
Packit |
78deda |
thisdirclean: localclean
|
|
Packit |
78deda |
.PHONY: localclean
|
|
Packit |
78deda |
localclean:
|
|
Packit |
78deda |
-rm -f thinkjettopbm.c
|