Debian Codegraph @

converter/pbm/Makefile

raw
1 ifeq ($(SRCDIR)x,x)
2 SRCDIR = $(CURDIR)/../..
3 BUILDDIR = $(SRCDIR)
4 endif
5 SUBDIR = converter/pbm
6 VPATH=.:$(SRCDIR)/$(SUBDIR)
7
8 include $(BUILDDIR)/config.mk
9
10 PORTBINARIES = atktopbm brushtopbm cistopbm cmuwmtopbm \
11 ddbugtopbm g3topbm escp2topbm \
12 macptopbm mdatopbm mgrtopbm mrftopbm \
13 pbmto10x pbmto4425 pbmtoascii pbmtoatk \
14 pbmtobbnbg pbmtocis pbmtocmuwm pbmtodjvurle \
15 pbmtoepsi pbmtoepson pbmtoescp2 \
16 pbmtog3 pbmtogem pbmtogo pbmtoibm23xx pbmtosunicon pbmtolj \
17 pbmtoln03 pbmtolps \
18 pbmtomacp pbmtomatrixorbital pbmtomda pbmtomgr pbmtomrf \
19 pbmtonokia \
20 pbmtopi3 pbmtoplot pbmtopsg3 pbmtoptx pbmtowbmp \
21 pbmtoxbm pbmtoybm pbmtozinc \
22 pi3topbm pktopbm \
23 wbmptopbm xbmtopbm ybmtopbm
24
25 ifneq ($(LEX)x,x)
26 PORTBINARIES += thinkjettopbm
27 endif
28
29 #pbmpage uses sqrt(), which is sometimes in libc, not libm. Is it ever
30 #in libm?
31 MATHBINARIES = pbmtopk
32 BINARIES = $(PORTBINARIES) $(MATHBINARIES)
33 SCRIPTS = pbmtox10bm
34 EXTRA_OBJECTS = g3ttable.o g3prefab.o
35
36 OBJECTS = $(BINARIES:%=%.o) $(EXTRA_OBJECTS)
37
38 MERGEBINARIES = $(BINARIES)
39 MERGE_OBJECTS = $(MERGEBINARIES:%=%.o2) $(EXTRA_OBJECTS)
40
41 HAVE_MERGE_COMPAT=YES
42
43 SUBDIRS=pbmtoppa
44
45 .PHONY: all
46 all: $(BINARIES) $(SUBDIRS:%=%/all)
47
48 include $(SRCDIR)/common.mk
49
50 ifneq ($(LEX)x,x)
51 thinkjettopbm.c1:%.c1:%.l
52 $(LEX) -t $< >$@
53 endif
54
55 thinkjettopbm.c:%.c:%.c1 $(SRCDIR)/lib/util/lexheader
56 # Different versions of Lex produce subtly different output, from the
57 # same .l source file. The .c1 file contains the raw output from Lex.
58 # We now massage it so it will compile. We must add some definitions
59 # at the top (the lexheader file). We must remove any yylex and
60 # yywrap prototype, as our .l file already contains one. The Lex
61 # version "Software Generation Utilities (SGU) Solaris-ELF (4.0)"
62 # puts declarations for yylex and yywrap, as external symbols,
63 # into its output, causing a duplicate declaration error at compile time.
64 #
65 # Schwarb Manfred reports that it compiles OK, but with warnings, on
66 # Solaris. Solaris Lex has a -e option that eliminates the lex
67 # warnings, but causes compiler warnings. AIX and Flex don't have a
68 # -e option. -Bryan 2001.05.16.
69 #
70 # But Peter Weisz reported on 2002.12.11 that on Solaris, compile
71 # failed due to a duplicate declaration of yylex and yywrap with Netpbm
72 # 10.12, which does not remove those declarations as the current version
73 # does.
74 cat $(SRCDIR)/lib/util/lexheader $< | \
75 grep -v "^[[:space:]]*int yylex(void);" | \
76 grep -v "^[[:space:]]*int yywrap(void);" \
77 >$@
78
79 install.bin install.merge: install.bin.local
80 .PHONY: install.bin.local
81 install.bin.local: $(PKGDIR)/bin
82 # Remember that $(SYMLINK) might just be a copy command.
83 # In December 2010 (Actually January 2011), pbmtosunicon replaced pbmtoicon
84 cd $(PKGDIR)/bin ; \
85 $(SYMLINK) pbmtosunicon$(EXE) pbmtoicon$(EXE)
86
87 mergecomptrylist:
88 cat /dev/null >$@
89 echo "TRY(\"pbmtoicon\", main_pbmtosunicon);" >>$@
90
91 thisdirclean: localclean
92 .PHONY: localclean
93 localclean:
94 -rm -f thinkjettopbm.c
95
96 pbmtog3: g3ttable.o g3prefab.o
97 pbmtog3: ADDL_OBJECTS = g3ttable.o g3prefab.o
98
99 g3topbm: g3ttable.o
100 g3topbm: ADDL_OBJECTS = g3ttable.o