File: Makefile

package info (click to toggle)
foo2zjs 20200505dfsg0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 9,668 kB
  • sloc: ansic: 41,030; xml: 12,765; sh: 7,882; makefile: 1,722; objc: 573; tcl: 173; perl: 102; python: 8
file content (65 lines) | stat: -rw-r--r-- 1,472 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
UNAME := $(shell uname)

PREFIX=	/usr
PREFIX=	$(DESTDIR)/usr
BIN=	$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man

SRC=	icc2ps.c xgetopt.c
LIB=	-llcms
CFLAGS+=	-O3

# _XOPEN_SOURCE is required for swab() but undefines strcasecmp(), so add _GNU_SOURCE as well:
CFLAGS+= -D_XOPEN_SOURCE -D_GNU_SOURCE

INSTALL=install
ifeq ($(UNAME),SunOS)
    INSTALL=/usr/ucb/install
    CC=gcc
endif

.SUFFIXES: .1 .1in

all: foo2zjs-icc2ps man

foo2zjs-icc2ps: $(SRC) $(LIB)
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SRC) $(LIB) -lm -o $@ $(LDFLAGS)

install: all
	$(INSTALL) -c foo2zjs-icc2ps $(BIN)

man:	foo2zjs-icc2ps.1

.1in.1: 
	-rm -f $*.1
	MODver=$(VERSION); \
	../includer-man -v DEF1=$(OLDGROFF) $*.1in | sed > $*.1 \
	    -e "s@\$${URLOAK}@$(URLOAK)@" \
	    -e "s@\$${URLZJS}@$(URLZJS)@" \
	    -e "s@\$${URLHP}@$(URLHP)@" \
	    -e "s@\$${URLXQX}@$(URLXQX)@" \
	    -e "s@\$${URLLAVA}@$(URLLAVA)@" \
	    -e "s@\$${URLQPDL}@$(URLQPDL)@" \
	    -e "s@\$${URLSLX}@$(URLSLX)@" \
	    -e "s@\$${URLHC}@$(URLHC)@" \
	    -e "s/\$${MODver}/$$MODver/"
	chmod a-w $*.1

install-man: man
	$(INSTALL) -d -m 755 $(MANDIR)
	$(INSTALL) -d -m 755 $(MANDIR)/man1/
	$(INSTALL) -c -m 644 foo2zjs-icc2ps.1 $(MANDIR)/man1/

clean:
	rm -f *.o foo2zjs-icc2ps *.1

foo2zjs-icc2ps: icc34.h

regress: all
	@./foo2zjs-icc2ps a b 2>&1 | grep "little cms P"
	@for i in ../icm/*.icm; do \
	    b=`basename $$i`; \
	    ./foo2zjs-icc2ps -o $$i -t0 | grep -v Created >$$b.ps; \
	    md5sum $$b.ps; \
	done
	@rm -f *icm.ps