File: Makefile

package info (click to toggle)
imgvtopgm 1.2-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 636 kB
  • ctags: 268
  • sloc: ansic: 1,557; makefile: 100; sh: 95
file content (94 lines) | stat: -rw-r--r-- 2,305 bytes parent folder | download
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# $Mu: imgvtopgm/Makefile 1.46 1998/06/02 22:30:45 $

##
## You should only have to play with SEX, CC, CFLAGS, LDFLAGS, and maybe LIBS.
## SEX should be LITTLEENDIAN, BIGENDIAN, or UNKNOWNENDIAN; if you leave the
## SEX as UNKNOWNENDIAN, the proper byte order will be determined at run-time.
##
## As usual you may have to fiddle with -D_POSIX_SOURCE on some systems
## (HP-UX 9.05 needed it to get ENOMEM).
##
VERSION  = 1.2
SEX      = UNKNOWNENDIAN
DEFS     = -DVERSION=\"$(VERSION)\" -D$(SEX)
CC       = gcc
CFLAGS   = -O2 -ansi -pedantic -Wall -Werror -Wmissing-prototypes \
		-I/usr/local/include $(DEFS)
LDFLAGS  = -s -L/usr/local/lib
#LIBS     = -lpgm -lpbm
LIBS	= -lnetpbm

PROGRAMS = \
	imgvinfo \
	imgvtopnm \
	imgvview \
	pbmtoimgv \
	pgmtoimgv \
	ppmimgvquant
MANPAGES = \
	imgvinfo.1 \
	imgvtopnm.1 \
	imgvview.1 \
	pbmtoimgv.1 \
	pgmtoimgv.1 \
	ppmimgvquant.1

IPDBROBJ = ipdb_r.o ipdb_c.o sex.o 
IPDBWOBJ = ipdb_w.o ipdb_c.o sex.o 
IPDBOBJ  = ipdb_r.o ipdb_w.o ipdb_c.o sex.o
IMGVOBJ  = imgvtopnm.o $(IPDBROBJ)
IMGVIOBJ = imgvinfo.o $(IPDBROBJ)
PGMOBJ   = pgmtoimgv.o $(IPDBWOBJ)
PBMOBJ   = pbmtoimgv.o $(IPDBWOBJ)
OBJ      = imgvtopnm.o pgmtoimgv.o pbmtoimgv.o imgvinfo.o $(IPDBOBJ)
CLEAN    = $(OBJ)
RCLEAN   = $(CLEAN) $(PROGRAMS) $(MANPAGES)

all: $(PROGRAMS) $(MANPAGES)

.SUFFIXES: .man .1
.man.1:
	sed 's/@@VERSION@@/$(VERSION)/' < $< > $@

imgvtopnm: $(IMGVOBJ)
	$(CC) $(LDFLAGS) -o imgvtopnm $(IMGVOBJ) $(LIBS)

imgvinfo: $(IMGVIOBJ)
	$(CC) $(LDFLAGS) -o imgvinfo $(IMGVIOBJ) $(LIBS)

pgmtoimgv: $(PGMOBJ)
	$(CC) $(LDFLAGS) -o pgmtoimgv $(PGMOBJ) $(LIBS)

pbmtoimgv: $(PBMOBJ)
	$(CC) $(LDFLAGS) -o pbmtoimgv $(PBMOBJ) $(LIBS)

ppmimgvquant: ppmimgvquant.sh
	sed 's/@@VERSION@@/$(VERSION)/' < $< > $@
	chmod 755 $@

imgvview: imgvview.sh
	sed 's/@@VERSION@@/$(VERSION)/' < $< > $@
	chmod 755 $@

.PHONY: clean realclean ident
clean:
	rm -f $(CLEAN)

distclean: realclean
realclean: 
	rm -f $(RCLEAN)

ident:
	@ident $(PROGRAMS)

##
## Hand-made dependencies.  I don't like what makedepend does to my
## Makefiles and I can't assume that your make supports "include"; the
## dependencies are simple enough that it doesn't really matter anyway.
##
$(MANPAGES):	Makefile
ppmimgvquant:	Makefile
imgvview:	Makefile
$(OBJ):		Makefile slop.h ipdb.h
$(IPDBOBJ):	ipdbP.h sex.h
sex.o:		sex.h