File: Makefile.in

package info (click to toggle)
magicrescue 1.1.9-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 812 kB
  • ctags: 530
  • sloc: ansic: 1,939; perl: 1,649; sh: 316; makefile: 65
file content (86 lines) | stat: -rw-r--r-- 2,080 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
SHELL = /bin/sh
PROGRAMS = magicrescue dupemap tools/inputseek tools/safecat \
	   tools/textextract
DOCS = doc/magicrescue.1 doc/dupemap.1 doc/magicsort.1

# object file lists
MAGICRESCUE_OBJS = src/magicrescue.o src/array.o src/extract.o src/recipe.o \
		   src/scanner.o src/util.o

DUPEMAP_OBJS = src/dupemap.o src/recur.o

INPUTSEEK_OBJS   = tools/inputseek.o   src/util.o
SAFECAT_OBJS     = tools/safecat.o     src/util.o
TEXTEXTRACT_OBJS = tools/textextract.o src/util.o

# default target
all: $(PROGRAMS) docs

# program targets
magicrescue: $(MAGICRESCUE_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(MAGICRESCUE_OBJS)

dupemap: $(DUPEMAP_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(DBM_LDFLAGS) $(DUPEMAP_OBJS)
 
tools/inputseek: $(INPUTSEEK_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(INPUTSEEK_OBJS)

tools/safecat: $(SAFECAT_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(SAFECAT_OBJS)

tools/textextract: $(TEXTEXTRACT_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(TEXTEXTRACT_OBJS)

# implicit targets
.c.o:
	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<

.o:
	$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $<

.pod.1:
	pod2man --release "$(RELEASE)" --center "Magic Rescue" $< $@

# phony targets
docs: $(DOCS)

clean:
	rm -f src/*.o tools/*.o

distclean: clean
	rm -f $(PROGRAMS) Makefile config.h config.log

docs-clean:
	rm -f $(DOCS)

maintainer-clean: distclean docs-clean

install: all
	mkdir -p $(DESTDIR)/usr/lib/magicrescue/tools \
	    $(DESTDIR)/usr/share/magicrescue/recipes \
            $(DESTDIR)/usr/bin
	
	cp magicrescue$(EXE) dupemap$(EXE) magicsort $(DESTDIR)/usr/bin/
	cp recipes/* $(DESTDIR)/usr/share/magicrescue/recipes/
	
	for f in tools/*; do \
	  if [ -x "$$f" ]; then \
	    cp -f "$$f" $(DESTDIR)/usr/lib/magicrescue/tools/; \
	  fi; \
	done

uninstall:
	rm -f $(DESTDIR)/usr/bin/magicrescue$(EXE)
	rm -f $(DESTDIR)/usr/bin/dupemap$(EXE)
	rm -f $(DESTDIR)/usr/bin/magicsort
	rm -rf $(DESTDIR)/usr/share/magicrescue/tools
	rm -rf $(DESTDIR)/usr/share/magicrescue/recipes
	-rmdir $(DESTDIR)/usr/share/magicrescue

.PHONY: all clean distclean docs-clean maintainer-clean install uninstall docs

.SUFFIXES: .1 .pod

.POSIX: