| 1 |
# @(#) $Id: Makefile,v 1.33 2005/07/25 19:41:06 alex Exp $ |
| 2 |
# Makefile for EXIFPROBE image file probe |
| 3 |
|
| 4 |
# Any compiler should do |
| 5 |
CC?=cc |
| 6 |
CFLAGS+=-DCOLOR -O -std=c99 |
| 7 |
|
| 8 |
# You probably don't need these |
| 9 |
# CFLAGS=-DCOLOR -g -O -Dlint -Wall -Wno-long-long |
| 10 |
# SPLINTCFLAGS=-DCOLOR -Dlint -showsummary |
| 11 |
|
| 12 |
# If your system has strcasestr(3) you can use this if you like. |
| 13 |
# If not defined a fake routine is used (which should be good enough, |
| 14 |
# this is used only for the -C option) |
| 15 |
# CFLAGS+=-DSTRCASESTR=strcasestr |
| 16 |
|
| 17 |
#Solaris; cultural differences |
| 18 |
#CFLAGS += -Du_int32_t=uint32_t |
| 19 |
|
| 20 |
# You'll need this on big-endian machines if (and ONLY if) "byteorder.h" |
| 21 |
# is not created properly on first invocation. |
| 22 |
#CFLAGS += -DNATIVE_BYTEORDER_BIGENDIAN # or add to ./byteorder.h |
| 23 |
|
| 24 |
# On Solaris, you may need to use 'gmake', or edit the next line. |
| 25 |
INSTALL = install -d -m 644 |
| 26 |
PREFIX ?= $(DESTDIR)/usr |
| 27 |
BINDIR=$(PREFIX)/bin/local |
| 28 |
MANDIR=$(PREFIX)/share/man/man1 |
| 29 |
|
| 30 |
INCLUDES=defs.h extern.h misc.h tifftags.h exiftags.h \ |
| 31 |
tiffeptags.h jpegtags.h global.h |
| 32 |
|
| 33 |
MAKERSRCS=maker_nikon.c maker_epson.c maker_olympus.c maker_fujifilm.c \ |
| 34 |
maker_casio.c maker_minolta.c maker_sanyo.c maker_canon.c \ |
| 35 |
maker_leica.c maker_agfa.c maker_asahi.c maker_panasonic.c \ |
| 36 |
maker_kyocera.c maker_toshiba.c maker_sigma.c maker_sony.c \ |
| 37 |
maker_konica.c maker_hp.c maker_kodak.c maker_ricoh.c \ |
| 38 |
maker_traveler.c |
| 39 |
|
| 40 |
MAKEROBJS=maker_nikon.o maker_epson.o maker_olympus.o maker_fujifilm.o \ |
| 41 |
maker_casio.o maker_minolta.o maker_sanyo.o maker_canon.o \ |
| 42 |
maker_leica.o maker_agfa.o maker_asahi.o maker_panasonic.o \ |
| 43 |
maker_kyocera.o maker_toshiba.o maker_sigma.o maker_sony.o \ |
| 44 |
maker_konica.o maker_hp.o maker_kodak.o maker_ricoh.o \ |
| 45 |
maker_traveler.o |
| 46 |
|
| 47 |
SRCS=main.c readfile.c print.c tagnames.c process.c misc.c interpret.c \ |
| 48 |
print_maker.c maker_generic.c maker_tagnames.c options.c ciff.c\ |
| 49 |
jp2000.c mrw.c raf.c x3f.c \ |
| 50 |
$(MAKERSRCS) |
| 51 |
|
| 52 |
OBJS=main.o readfile.o print.o tagnames.o process.o misc.o interpret.o \ |
| 53 |
print_maker.o maker_generic.o maker_tagnames.o options.o ciff.o \ |
| 54 |
jp2000.o mrw.o veclib.o raf.o x3f.o \ |
| 55 |
$(MAKEROBJS) |
| 56 |
|
| •57 |
all: exifprobe |
| 58 |
|
| 59 |
byteorder.h: |
| 60 |
@echo -n "Creating byteorder.h: " |
| 61 |
@sh makebyteorder.sh |
| 62 |
@cat byteorder.h |
| 63 |
@echo |
| 64 |
|
| •65 |
readfile.o: byteorder.h |
| 66 |
|
| 67 |
veclib.o: lib/veclib.c |
| 68 |
$(CC) -o veclib.o -c $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) lib/veclib.c |
| 69 |
|
| 70 |
# Need the math library to calculate some APEX things... |
| 71 |
exifprobe: $(OBJS) $(INCLUDES) Makefile |
| 72 |
./mkcomptime > comptime.c |
| 73 |
$(CC) -o exifprobe $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) $(OBJS) comptime.c -lm |
| 74 |
|
| 75 |
install: all |
| 76 |
install -d $(PREFIX)/bin |
| 77 |
install -d $(PREFIX)/share/man/man1 |
| 78 |
install -c -m 755 exifprobe $(PREFIX)/bin |
| 79 |
install -c -m 755 exifgrep $(PREFIX)/bin |
| 80 |
install -c -m 644 exifprobe.1 $(PREFIX)/share/man/man1 |
| 81 |
install -c -m 644 exifgrep.1 $(PREFIX)/share/man/man1 |
| 82 |
|
| 83 |
# if you want HTML man pages, pick a target; I prefer man2html |
| 84 |
rman: exifprobe.1 exifgrep.1 |
| 85 |
# edit at <blockquote> & APP0...APPn; rman gets it wrong |
| 86 |
rman -f HTML exifprobe.1 > exifprobe-rman.html |
| 87 |
rman -f HTML exifgrep.1 > exifgrep-rman.html |
| 88 |
|
| 89 |
man: exifprobe.1 exifgrep.1 |
| 90 |
groff -man -Thtml exifprobe.1 > exifprobe-man.html |
| 91 |
groff -man -Thtml exifgrep.1 > exifgrep-man.html |
| 92 |
|
| 93 |
man2html: |
| 94 |
nroff -man exifprobe.1 | man2html -pgsize 1024 -topm 0 -botm 2 -noheads > exifprobe.1.html |
| 95 |
nroff -man exifgrep.1 | man2html -pgsize 1024 -topm 0 -botm 2 -noheads > exifgrep.1.html |
| 96 |
|
| 97 |
clean: |
| 98 |
rm -f exifprobe *.o comptime.c |
| 99 |
|
| 100 |
distclean: clean undepend |
| 101 |
rm -f byteorder.h MANIFEST.* Makefile.bak exifprobe-*.tar.gz |
| 102 |
|
| 103 |
depend: byteorder.h |
| 104 |
makedepend -- $(CFLAGS) -- $(SRCS) |
| 105 |
|
| 106 |
undepend: |
| 107 |
makedepend |
| 108 |
|
| 109 |
splint: $(SRCS) $(INCLUDES) Makefile |
| 110 |
splint $(SPLINTCFLAGS) $(SRCS) |
| 111 |
|
| 112 |
# DO NOT DELETE THIS LINE -- make depend depends on it. |